Afficher un message
Vieux 06/11/2007, 08h54   #2
xenides@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How can I improve the performance of this kind of query?

Ted

The statement

AND B.price_date > A.price_date
WHERE B.price_date IS NULL

is contradictory. For B.price_date > A.price_date to return true,
then B.price_date has to be NOT NULL (otherwise it returns null). On
the next line you are asking B.price_date to be NULL. Seems like you
are doing a lot of comparison work for no purpose.

Also B.price_date is null will return unmatched rows in B or matched
rows where B.price_date is null. Not sure if that is what you want?
In fact I can't see a reason to have table B in there at all. What
was your purpose for including it?

X



  Réponse avec citation
 
Page generated in 0,04271 seconds with 9 queries