Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Programming. | 3 guests |
Acmlm's Board - I2 Archive - Programming - How many is too many? | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
windwaker Ball and Chain Trooper WHY ALL THE MAYONNAISE HATE Level: 61 Posts: 647/1797 EXP: 1860597 For next: 15999 Since: 03-15-04 Since last post: 4 days Last activity: 6 days |
| ||
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). | |||
Gavin Fuzzy Rhinoceruses don't play games. They fucking charge your ass. Level: 43 Posts: 352/799 EXP: 551711 For next: 13335 Since: 03-15-04 From: IL, USA Since last post: 13 hours Last activity: 13 hours |
| ||
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 Ball and Chain Trooper WHY ALL THE MAYONNAISE HATE Level: 61 Posts: 657/1797 EXP: 1860597 For next: 15999 Since: 03-15-04 Since last post: 4 days Last activity: 6 days |
| ||
The6thLime wants 60 fields instead of like 120 two fielded rows . | |||
sloat Level: 16 Posts: 22/85 EXP: 18044 For next: 2212 Since: 05-21-04 From: South Central Delaware Since last post: 19 days Last activity: 5 hours |
| ||
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. |
|||
FreeDOS Lava Lotus Wannabe-Mod :< Level: 59 Posts: 932/1657 EXP: 1648646 For next: 24482 Since: 03-15-04 From: Seattle Since last post: 6 hours Last activity: 4 hours |
| ||
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. 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. |
|||
Vystrix Nexoth Level: 30 Posts: 196/348 EXP: 158678 For next: 7191 Since: 03-15-04 From: somewhere between anima and animus Since last post: 3 days Last activity: 2 days |
| ||
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. |
|||
Narf Hi Tuvai! (reregistering while banned) Level: 16 Posts: 2/100 EXP: 17634 For next: 2622 Since: 12-26-04 Since last post: 22 hours Last activity: 14 hours |
| ||
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. |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Programming - How many is too many? | | | |