2

I had this query that originally caused massive timeouts:

select d.r_object_id 
from isc_fiche  d, dmr_con c 
where any c.parent_id = d.r_object_id 
group by d.r_object_id 
having count(*) > 2 

yet when I add the enable (return_top 10) to the end then the performance issues seem a thing off the past. Apparently (according to colleagues) that statement could have a perfomance-improving effect.

Could someone clarify this for me?

Full query with 'way' better performance:

select d.r_object_id 
from isc_fiche  d, dmr_con c 
where any c.parent_id = d.r_object_id 
group by d.r_object_id 
having count(*) > 2 
enable(return_top 10)
palacsint
  • 26,486
  • 10
  • 75
  • 100
User999999
  • 2,430
  • 5
  • 35
  • 60

1 Answers1

2

enable (return_top 10) modifies the executed SQL statement, it adds a limiting clause to it, like ROWNUM <= 10 in Oracle. It depends on the underlying RDBMS, so I guess it's not ROWNUM <= 10 if you use EMC Documentum with Microsoft SQL Server.

You can run DQLs on the web interface of ECM Documentum (if I remember correctly it's called Webtop). There is a checkbox on the DQL run page which shows the generated SQL. You should check there what's the difference between the two DQL query.

Community
  • 1
  • 1
palacsint
  • 26,486
  • 10
  • 75
  • 100
  • 1
    You remembered correctly! :) Tested both queries and the performance difference is quite remarkable, yet the results are the same! I've found a link on the net with some extra info & added it to your reply! – User999999 May 22 '14 at 06:47