Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Is it good to have more columns in a table or not?

Author  Topic 

savvy
Starting Member

48 Posts

Posted - 2006-01-10 : 06:46:11
I am using MS SQL. I developing a Recruitment Agency website, in which i have a table called JobDetails which has 19 Columns already like jobtitle, jobreference, jobdesc etc.. and i'm thinking of adding even more to it. Is it the best way to do it or else shall i divide the table into two?
Which is the efficient way?
how many columns can be in a table, i know there is no fixed number but to be efficient how many columns can be there?
and if anyone can explain why? then that will be really great
Thanks in Advance

Savvy

nr
SQLTeam MVY

12543 Posts

Posted - 2006-01-10 : 06:56:54
The wider the column the less efficient at returning data (will fit less rows in memory).
If you have frequently accessed data and infrequently accessed then you could split these into two tables. Similarly for frewuently updated as this would reduce fragmentation on one table.

I wouldn't worry too much about it though as the performance impact probably isn't too great depending on the system. If your interface is via SPs you can always restructure later without impacting applications.
Certainly 19 cols doesn't sound a lot for a table called JobDetails.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

savvy
Starting Member

48 Posts

Posted - 2006-01-10 : 08:53:53
Thank you very much nr for your help
So 19 cols is not that bad
Can anyone tel me how many maximum number of columns can we fit into a table to perform it efficiently
Thanks

Savvy
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-01-10 : 09:20:56
>> Can anyone tel me how many maximum number of columns can we fit into a table to perform it efficiently
No.
It depends on the system and you would probably hit the max rowsize (8060) before max columns (1024).


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

savvy
Starting Member

48 Posts

Posted - 2006-01-10 : 09:56:30
Cheers mate
I got my answer

Savvy
Go to Top of Page
   

- Advertisement -