Re: Need sql optimization help

2007-03-03 Thread Peter Brawley
TECTED] Sent: Saturday, March 03, 2007 1:40 PM To: Bryan Cantwell Cc: mysql@lists.mysql.com Subject: Re: Need sql optimization help Bryan, A 'Not Exists' query <http://www.artfulsoftware.com/infotree/queries.php#41> is usually faster when coded as an exclusion join, eg for max-some-

Re: Need sql optimization help

2007-03-03 Thread Michael Dykman
d IS NULL ORDER BY e.time_stamp DESC From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: Saturday, March 03, 2007 1:40 PM To: Bryan Cantwell Cc: mysql@lists.mysql.com Subject: Re: Need sql optimization help Bryan, A 'Not Exists' query <http://www.artfulsoft

RE: Need sql optimization help

2007-03-03 Thread Bryan Cantwell
day, March 03, 2007 1:40 PM To: Bryan Cantwell Cc: mysql@lists.mysql.com Subject: Re: Need sql optimization help Bryan, A 'Not Exists' query <http://www.artfulsoftware.com/infotree/queries.php#41> is usually faster when coded as an exclusion join, eg for max-some-value per key, left

Re: Need sql optimization help

2007-03-03 Thread Peter Brawley
Bryan, A 'Not Exists' query is usually faster when coded as an exclusion join, eg for max-some-value per key, left join on the key variable and left.value < right. value where left.key is null, so you would need something like ... SELE

Need sql optimization help

2007-03-03 Thread Bryan Cantwell
I have the following sql that works for what I want to see but is terribly slow due to the subquery. Any suggestions on how to get same result faster? I have tried group by and cant seem to get the correct results that way Also is there a product that can help optimize sql and indexing? SELEC