Following my post about this complex search I'm trying to do...

In the initial post I said I'd tried adding:

   left join table_ga as tga on tga.id = r.id
   left join table_a as ta on ta.ida = tga.ida

or:

   left join (table_ga as tga inner join table_a as ta) on
      (tga.id = r.id and ta.ida = tga.ida)

to my query, and that both got the same results. Having added two pairs and tried both versions, I find the second one is fractionally (but I mean /really/ fractionally) faster, as reported by phpMyAdmin. However, when I do an Explain on both versions, the first shows values of 375, 17, 3 and a bunch of 1s in the rows column, whereas the second shows 375, 34, 6 and the same lot of 1s. All other details are identical.

As I understand it in my naive, newbie way, as a rough rule of thumb you can compare the speeds of queries by multiplying together the rows values... in which case the search that was fractionally slower should have been four times as fast. What's going on here?

--
Cheers... Chris
Highway 57 Web Development -- http://highway57.co.uk/

I'm on a seafood diet - I see food, I eat it.
   -- Dolly Parton

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to