If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > optimize correlated subquery for updates

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-26-03, 07:04
rajesh_voc rajesh_voc is offline
Registered User
 
Join Date: Jun 2003
Posts: 3
Question optimize correlated subquery for updates

Is it possible to optimize a correlated subquery in case of updation.Is there any type of SQL which can replace these type of SQL.My sql is given below

update table_A
set (A.col1l, A.col12, A.col3) =
((select B.col1l, B.col12, B.col3 from table_B
where B.site_id = A.site_id)) ;

[Note there is a index on B.site_id]
while the table_A has around 71columns & 519385 records
while table_B has around 5 columns & 357548 records.The time for updation is around 17 mins.when I created a temporary table of table_A with 4 columns (ie all columns which is used for updation or used in join condition) then the time for updating the temporay table is just 2 minutes.I Hope this difference in timing for updation is due to the differenece in size of the rows between the temporary table & table_A.Is there any way in informix to achieve updation of table_A with the same speed for temporary table by increasing the row cache ?.How do i optimize this type of sql
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On