I'm trying to speed up a mySQL query by making it use the index, but for some reason it's telling me that the syntax is wrong. I can't figure out why, though. Any ideas?
All I did was add "USE INDEX (PRIMARY)"
SELECT a.listing_id FROM db_listings USE INDEX (PRIMARY)
a LEFT JOIN db_users u ON u.user_id=a.owner_id WHERE a.active=1 GROUP BY a.listing_id
Put the table alias a before the USE INDEX clause.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With