Posted by Toby A Inkster on 01/24/08 09:57
Neeper wrote:
> I know a seperate tables will be faster for searches because there will
> be less records but in terms of maintenance it gets a little messy and
> hectic as the list of cities will grow.
Separate tables will work at a snail's pace if you want to do cross-city
searches.
Keep them in one table. Index any columns that you plan on searching or
sorting by.
> I'm not sure how many records it takes before MySQL starts to slow
> down.
I dunno -- millions? Depends on many factors.
Just make sure that you use PDO or some other cross-database programming
tool, and avoid MySQL-specific syntax nuances. That way, you can easily
port the application to another database (perhaps even a database cluster)
if your data grows out of control.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 24 days, 21:06.]
CSS to HTML Compiler
http://tobyinkster.co.uk/blog/2008/01/22/css-compile/
[Back to original message]
|