This post is for my SQL Profile series
drop table OSL_ALL_OBJECTS;
drop table OSL_OWNER_OBJECTS;
create table OSL_ALL_OBJECTS as
with generator as (select /*+ materialize */
OBJECT_ID, OBJECT_NAME, OBJECT_TYPE
from dba_objects where rownum<10000 font="">10000>
select a.OBJECT_ID, a.OBJECT_NAME, a.OBJECT_TYPE
from generator a, generator b
where rownum > 10000000;
create table OSL_OWNER_OBJECTS as select OBJECT_ID, OWNER from dba_objects;
create index ooo_od_ix on OSL_OWNER_OBJECTS (OBJECT_ID);
create index oao_od_ix on OSL_ALL_OBJECTS (OBJECT_ID);
SQL> desc OSL_ALL_OBJECTS
Name Null? Type
------------------------------ -------- ----------------------
OBJECT_ID NOT NULL NUMBER
OBJECT_NAME VARCHAR2(128)
SUBOBJECT_NAME VARCHAR2(128)
SQL> desc OSL_MOD2_OWNER
Name Null? Type
------------------------------ -------- ----------------------
OBJECT_ID NOT NULL NUMBER
OWNER VARCHAR2(128)
SQL> select count(*) from OSL_OWNER_OBJECTS;
COUNT(*)
----------
132364
SQL> select count(*) from OSL_ALL_OBJECTS;
COUNT(*)
----------
264746
Nessun commento:
Posta un commento