javadqldocumentumdfc

Speed up the data retrieval from Documentum via DQL


I am doing a Java project connected to Documentum and I need to retrieve data from object table. The thing is when I retrieve from 1 table I can get the answeres in max 2 seconds for each of the following tables with the following DQLs:

SELECT * FROM cosec_general 

and

SELECT * FROM dm_dbo.cosec_general_view 

however once I want to join those two tables together in retrieve from the result it takes 5 min to do so. Is there any way that I can make it faster? Here is the DQL that I use to join them I get teh columns that I need:

SELECT dm_dbo.cosec_general_view.name, dm_dbo.cosec_general_view.comp_id, 
dm_dbo.cosec_general_view.bg_name, dm_dbo.cosec_general_view.incorporation_date, 
dm_dbo.cosec_general_view.status, dm_dbo.cosec_general_view.country_name, 
cosec_general.acl_domain, cosec_general.acl_name 
FROM dm_dbo.cosec_general_view, cosec_general 

Solution

  • There is no condition on which fields you are trying to join, Add WHERE clause containing condition for join, like WHERE dm_dbo.cosec_general_view.field_1=cosec_general.field_2