What's a reasonable number of rows and tables to be able to join in MySQL?

Posted by Philip Brocoum on Stack Overflow See other posts from Stack Overflow or by Philip Brocoum
Published on 2010-04-02T21:25:19Z Indexed on 2010/04/02 21:33 UTC
Read the original article Hit count: 266

Filed under:
|
|
|

I have one table that maps locations to postal codes. For example, New York State has about 2000 postal codes. I have another table that maps mail to the postal codes it was sent to, but this table has about 5 million rows. I want to find all the mail that was sent to New York State, which seems simple enough, but the query is unbelievably slow. I haven't been able to even wait long enough for it to finish. Is the problem that there are 5 million rows? I can't help but think that 5 million shouldn't be such a large number for a computer these days... Oh, and everything is indexed. Is SQL just not designed to handle such large joins?

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql