I run this query:
SELECT u.user_id, u.fname, u.lname, n.title, n.news_id, n.post,
n.zip, z.city,z.state_abbr
FROM yc_users u, yc_news n, yc_zipcodes z
WHERE u.user_id = n.user_id AND n.zip = z.zip
ORDER BY n.stamp
LIMIT 10
And get this error:
The SELECT would examine more than MAX_JOIN_SIZE rows;
check your WHERE and use SET SQL_BIG_SELECTS=1 or
SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
I've got over 42,000 rows under yc_zipcodes
. The other tables hold less than 10 rows at the moment.
EDIT: Data samples as requested:
yc_zipcodes
zip city state_abbr
00210 Portsmouth NH
00211 Portsmouth NH
00212 Portsmouth NH
00213 Portsmouth NH
yc_users
user_id username password fname lname email zip active_bln
1 fission1 e09dc84a23fd6cd68ce1fff1ff95713a Hayden Ferguson [email protected] 92831 1
2 jason c2d0d212936c4bfd7f587607e6c72808 jason stevenson [email protected] 93710 1
yc_news
news_id user_id title post zip stamp active_bln
2 1 Gummy bear falls into manhole OMG! A drunk man dressed as gummy bear... 93740 2009-10-12 09:49:04 1
3 1 Guy robbed Some dude got robbed last night at corner of... 93740 2009-10-12 09:50:19 1
The data above is dud. No gummy bears were during the making of this application =D