Some help with indexing please?
Hello. I am trying to understand indexing and i'm a bit stumped when it comes to joins.
I have two tables
A website table (Primary Key here is website_id)
A links table (Foreign Key here is website_id)
And every link in my links table belongs to a SINGLE website in the websites table so I perform a join on it
Is that correct? If not what else would I need to index everything properly here in order to run the above query? Thank you
Your key (explain) is also empty. You probably have not enought data so mysql would use any key. It fugures it is best to stash everythig into memory and does not use any key.
Bubikol is probably right, but if you want to, you could show us what EXPLAIN shows you. There is more info in the EXPLAIN that might confirm Bubikol's guess..or not.
|All times are GMT +1. The time now is 10:46 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.