Jump to content

Quick question


lampstax

Recommended Posts

Just wonder what the difference is, performance wise, between having 10k record stored in 10 tables vs 100k record store in 1 table.

 

Lets assume we're talking about a popular forum with 10 sub forums.  Postings is the table that currently contains all the messages and posting.

 

Is there any benefit to splitting 'Posting' off to 10 tables each containing a unique sub forum's postings ?

 

SQL wise, its pretty much

 

SELECT * FROM postings WHERE subforumid = 'x' ORDER BY updated_date DESC

 

VS.

 

SELECT * FROM postings_subforumx ORDER BY updated_date DESC

 

What do you guys think ?

Link to comment
https://forums.phpfreaks.com/topic/115422-quick-question/
Share on other sites

from what i know ( i dont have experienced that), its better to have one single table with the right index or indexes.

I believe that a good index is the key of the performance, whatever the number of records in.

 

Another important notion is normalization :

Use the 3rd normal form, with index on primary keys and foreigner keys, and you should have nice performances.

 

Z.

Link to comment
https://forums.phpfreaks.com/topic/115422-quick-question/#findComment-593452
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.