views:

41

answers:

3

Every page on my application will display 1000 records and they are only needed on that page.

Is it more efficient to have one huge table with an additional 'page id' column or to have a new table for each page?

I imagine accessing data from a single small table would be easier than a huge one but it will make the database a bit of a mess.

Any thoughts?

+6  A: 

In no way would a single table for each page be a good idea. Very, very silly idea.

Databases are intentionally designed for storing large amounts of information. Just use a single table with a Page_id column. Just make to set up the proper indexes for data retrieval.

Joe Philllips
Thanks :) ... I like the 'very very silly idea' bit
Mark
+1  A: 

1000 columns is nothing, one table with a PK and index or two on columns mostly searched by is good. Simply use indexes on columns which appear in WHERE clause.

Damir Sudarevic
+1  A: 

Do the pages have similar data? I.E. would the columns be the same for each page? If so, put it all in one table. Having too many tables makes things overly complicated when a modern database is capable of efficiently storing and accessing millions of records.

jle