I have two tables:
table has a list of all users (you don't say?) in my system and it currently has around 57k records, while
table has around 37k records.
Primary key in both tables is an autoincrement
table is big in terms of attribute count (around 20, one of them is
table has only (along with
I wanted to query out the "nonVip" users by doing this (with help of this question
here on SO):
SELECT all_users.id, all_users.email
LEFT OUTER JOIN vip_users
WHERE vip_users.email IS NULL
And now, finally coming to the problem - I ran this query in phpmyadmin and even after 20 minutes I was forced to close it and restart httpd service as it was taking too long to complete, my server load jumped over 2 and the site (which also queries the database) became useless as it was just loading too slow. So, my question is - how do I make this query? Do I make some script and run it over night - not using phpmyadmin (is this maybe where the problem lies?), or do I need to use different SQL query?
Please help with your thoughts on this.