Bert Gombos
Member²
When I use Describe Object functionality, PLSQL Developer (9.0.6) issues this:
select t.*, o.*, m.comments from sys.dba_tables t,
sys.dba_tab_comments m,
sys.dba_objects o
where t.owner =
bject_owner
and t.table_name =
bject_name
and m.owner (+) =
bject_owner
and m.table_name (+) =
bject_name
and o.owner (+) =
bject_owner
and o.object_name (+) =
bject_name
and
bject_type is not null
and :sub_object is null
This is not good because of lack of joins. It causes merge join cartesian on some big databases.
Please use this:
select t.*, o.*, m.comments from sys.dba_tables t,
sys.dba_tab_comments m,
sys.dba_objects o
where t.owner =
bject_owner
and t.table_name =
bject_name
and m.owner (+) = t.owner
and m.table_name (+) = t.table_name
and o.owner (+) = t.owner
and o.object_name (+) = t.table_name
and
bject_type is not null
and :sub_object is null
Review of all data dictionary queries is recommended.
select t.*, o.*, m.comments from sys.dba_tables t,
sys.dba_tab_comments m,
sys.dba_objects o
where t.owner =

and t.table_name =

and m.owner (+) =

and m.table_name (+) =

and o.owner (+) =

and o.object_name (+) =

and

and :sub_object is null
This is not good because of lack of joins. It causes merge join cartesian on some big databases.
Please use this:
select t.*, o.*, m.comments from sys.dba_tables t,
sys.dba_tab_comments m,
sys.dba_objects o
where t.owner =

and t.table_name =

and m.owner (+) = t.owner
and m.table_name (+) = t.table_name
and o.owner (+) = t.owner
and o.object_name (+) = t.table_name
and

and :sub_object is null
Review of all data dictionary queries is recommended.