Re: slow insert into select statement

2004-05-27 Thread nyem
Thanks for all the feedback. Here's my latest attempt: SELECT @start:=NOW(); SELECT @date1:=DATE_SUB( CURDATE(), INTERVAL 1 MONTH); SELECT @date2:=CURDATE(); LOCK TABLES rptPricingTEST READ, rptPricingTEST a READ; CREATE TEMPORARY TABLE tmpLatestDates SELECT commodity,

Re: slow insert into select statement

2004-05-27 Thread SGreen
: Fax to: 05/27/2004 05:01 Subject: Re: slow insert into select statement AM

slow insert into select statement

2004-05-26 Thread nyem
I have this insert statement that took a long time to execute: INSERT INTO priceLast5 SELECT DISTINCT a.commodity, a.PricingDt FROM rptPricingTEST a WHERE a.PricingDt = ( SELECT MAX(PricingDt) FROM

RE: slow insert into select statement

2004-05-26 Thread Victor Pendleton
If you do the math a large result set will be created. You could rewriting your query or adding more indexes to see if this speeds up the process. -Original Message- From: nyem To: [EMAIL PROTECTED] Sent: 5/26/04 2:57 AM Subject: slow insert into select statement I have this insert

RE: slow insert into select statement

2004-05-26 Thread Andrew Braithwaite
PROTECTED] Sent: Wednesday 26 May 2004 14:13 To: 'nyem '; '[EMAIL PROTECTED] ' Subject: RE: slow insert into select statement If you do the math a large result set will be created. You could rewriting your query or adding more indexes to see if this speeds up the process. -Original Message

RE: slow insert into select statement

2004-05-26 Thread SGreen
to build? Try running the select seperately and see how long it takes... Andrew -Original Message- From: Victor Pendleton [mailto:[EMAIL PROTECTED] Sent: Wednesday 26 May 2004 14:13 To: 'nyem '; '[EMAIL PROTECTED] ' Subject: RE: slow insert into select statement If you do the math a large