Database Table Size / # of Records question...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
superwormy
Forum Commoner
Posts: 67
Joined: Fri Oct 04, 2002 9:25 am
Location: CT

Database Table Size / # of Records question...

Post by superwormy »

MySQL specifically, but it probably applies to other databases as well.


Say you had a large number of records in a single table, like 500,000 records AS OPPOSED TO 5x 100,000 record tables.
Assuming it wasn't much more overhead to determine which table to select from, will the selects from the smaller tables be faster?



I guess the bottom line question is, as teh number of records grows, will performance decrease in the table?
fractalvibes
Forum Contributor
Posts: 335
Joined: Thu Sep 26, 2002 6:14 pm
Location: Waco, Texas

Database Table Size / # of Records question...

Post by fractalvibes »

Possibly, but the best answer is that it depends...
Depends upon the particular SQL
Depends if the Database can use an index to find the record(s) you seek
Depends - are there any indices defined?

Naturally, all things held equal, it will be quicker to find a particular record
in a table of 50 records than one containing 50,000. But you can improve your odds even with a large database by defining appropriate indices.

Phil J.
Post Reply