Originally posted by bengiles
Are you saying that searching a table with several joins (in a large database with hundreds of tables and millions of records) is just as fast as searching a table of the same size in a much smaller database?
If it were me, I'd benchmark what I'm doing to determine it for myself. The whole idea of Relational Databases (such as MySQL or Oracle) is to build around the idea of tables as your containers and relate to each of those tables. If you have read somewhere that no, using a bunch of databases (instead of tables) is faster in someway, please give me the ISBN of the publication or the URI of the link and I'll look at it myself.
What I've explained is very basic. Consideration also has to be given to how you've designed your database and what you are storing in the tables. Data types of BLOB or text, for example, are not as fast to search through when you run a query. Then the quesion is how you are indexing your tables. To my knowledge, I am not aware of how to index an entire database, let alone the myriad of databases in your master/slave set-up.
By the way, I see you are using a zip code distance calculator. Here is a good PHP class for that if these are zip codes based in the United States:
http://www.phpclasses.org/browse/package/1640.html