Re: FN-FORUM: Sql query help
date posted 13th January 2004 15:41
> Here's the output of explain for the sum()query:
> 0.02 sec
> and here it is for the joined query:
> 0.24 sec
Shite! I must admit I've never had a query run that slow in mysql, although
having two conditions within the JOIN clause is inefficient and may be to
blame.
I hadn't seen the funky SUM( IF(i.barcode IS NULL,1,0) ) AS count thing
before so I'll be popping that in my notes ;)
Can you let me know your final solution ?
Andy