Table: how big is big? (in columns...)

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
Gath
Forum Newbie
Posts: 20
Joined: Wed May 15, 2002 8:36 pm

Table: how big is big? (in columns...)

Post by Gath »

I saw some info around (in the MySQL manual there's something about it), but i can get a straihgt answer...

How big is big?

I mean, does a table with around 150-170 columns considered big?
Should i break it in several different tables?

Up-side is that in more then half the pages only 1 query would occour.
In several tables, several queries would occour...

Any info on this?

Thanks.
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

it really depends on what you are doing with the information. for mw i try to make my tables small using foreign keys to cross link information. this in turn gives me fewer columns in return for a few more tables (depends on the application). newbienetwork has a good databse design tutorial that could help you out.

do i guess in answer to your question: there is no limit really. i guess a good rule of thumb would be: its too big if you don't want to writee the long qury to get the information you need.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

It works like this: When you start to question whether a table is too big or not...it probably is. If you feel your design will lead to a large table, examine a different design. Their is always another way to do things.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

it's like the question 'is it fast?'. The question should be 'is it fast enough?'
Gath
Forum Newbie
Posts: 20
Joined: Wed May 15, 2002 8:36 pm

Post by Gath »

Ok, thanks...


And just a quicky:
does a query (SELECT) increase/decrease speed if one uses the * (all), or about only half of the fields?

Thanks.
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

using the * (all) selector is the slowest but the easiest. if you don't need to select all columns then don't and only select the ones you need
Post Reply