Jump to content


Photo

Efficiency Question


  • Please log in to reply
3 replies to this topic

#1 renwoshin

renwoshin
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 27 December 2005 - 08:17 AM

Hi --

I wonder what is more efficient and returns a quicker response for the server: One table with 3000 values, or 30 tables with 100 values each?

Thanks

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 27 December 2005 - 03:08 PM

Querying one table is definitely faster than querying 30 tables! By "values" do you mean columns? If so, you probably should be breaking up groups of related fields into different tables to keep with normal-form recommendations for RDBMS table design. Please clarify.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 renwoshin

renwoshin
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 27 December 2005 - 06:22 PM

[!--quoteo(post=330652:date=Dec 27 2005, 07:08 AM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Dec 27 2005, 07:08 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Querying one table is definitely faster than querying 30 tables! By "values" do you mean columns? If so, you probably should be breaking up groups of related fields into different tables to keep with normal-form recommendations for RDBMS table design. Please clarify.
[/quote]

Oh, by values i mean by rows. There will only be about 7 columns. Every table will have these same columns. So instead I should have a massive table as opposed to separate ones?

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 27 December 2005 - 08:39 PM

First, 3000 rows isn't a lot. Second, since the "logical" option would be to group all of them into a single flag with a type flag, what's the basis for keeping them separate? That is, how does this help?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users