It'll be a few hours before I get home and can do this query with the variations you
mentioned. I don't know if I need the separate index key on `salesrank` or not. I
thought it would speed up my query be having it.
In the previous email I included the results from doing an EXPLAIN. It shows:
table type possible_keys key key_len ref
rows Extra
pn_pricecompare_catprod ref PRIMARY,asin PRIMARY 4 const
369308 Using where; Using index; Using temporary; Using f...
pn_pricecompare_product eq_ref asin asin 10
pn_pricecompare_catprod.asin 1
The formatting is funky from my cut and paste, but it looks like 369,308 rows for this
particular query.
I think the product table has about 650,000 rows, and the category table has about
8,150,000 rows.
Thanks,
Grant
Hank <heskin@stripped> wrote: Ok, so the next step would be to try the original
query with just the
LIMIT clause, and then just the ORDER BY (but not both).
The results of "select count(*)" query would be helpful to know just
how many records mysql is trying to sort and limit.
And do you really need a separte index key on `salesrank` on the
product table?
-Hank
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com