--- Joe Wilson <[EMAIL PROTECTED]> wrote: > This should be faster: > > insert into x > select * from a.x x1 > where exists (select 1 from Y where x1.id = y.id); > > See if adding an order by statement will make it faster by speeding > up the inserts: > > insert into x > select * from a.x x1 > where exists (select 1 from Y where x1.id = y.id) > order by x1.id;
The last statement could be a bit faster if pragma temp_store = memory - assuming the intermediate select result set can fit into memory. ____________________________________________________________________________________ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------