User | Post |
Narf
Posts: 2/100 |
A lot of columns won't do any harm, unless you overuse them and select too much data each time.
For example, my members table has 77 columns, and I really don't need the data from every single one of those 77 columns on every page on my site. |
Vystrix Nexoth
Posts: 196/348 |
right. as long as each column is unique and necessary, go nuts. perhaps post the table schema here so we can comment on it.
sloat: he's talking about 60 columns, not 60 rows. *chuckles* indeed, if 60 rows is too great a load for the SQL system to bear, then either the SQL system or the programmer utilizing it could do well with some improvements, and I'll wager it's the former. |
FreeDOS
Posts: 932/1657 |
It depends on your needs... but in general it doesn't matter if you use them responsibly. I have a users table that has 40 fields and it works perfectly. Spanning an entry across more than one row creates overhead and slows it down... because of fragmentation. ![](images/smilies/shiftright.gif)
Just keep things simple and you won't get into trouble. Making one thing have more than one row just because of you have "id" and "data" fields is not simple. |
sloat
Posts: 22/85 |
more rows are more efficient i believe. remember, database systems are designed to be able to handle hundreds of thousands of rows, so 120 rows isn't going to hurt anything, especially if you set up an index.
i recently had a database set up with about 30,000 rows of 4 fields and i didn't notice any slowdown when accessing it. |
windwaker
Posts: 657/1797 |
The6thLime wants 60 fields instead of like 120 two fielded rows . |
Gavin
Posts: 352/799 |
i'm really no expert on DB efficiency, but i'm just curious what would require 60 columns in a single table?
as long as all 60 are unique and necessary fields i would think it would be alright... but i believe it all depends on how you are accessing the data. i'm sure you can have a 60 field table that is technically as efficient as possible, it all depends..
like i said though, i'm no expert, i've only created a few tables before and i hardly know if they are as efficient as possible. |
windwaker
Posts: 647/1797 |
Referring to columns in SQL tables. How many is too many? If I have ~60 columns, does that affect the speed at which things are loaded (or at least, greatly). |