PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > Table design with respect to number of columns
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Table design with respect to number of columns

Réponse
 
LinkBack Outils de la discussion
Vieux 04/09/2008, 12h26   #1
Bhaskar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Table design with respect to number of columns


I am designing a table for a financial application and I have a situation
where there are more than 100 different attributes of an entity to be
persisted in the database. All these attributes depend directly and
completely on the entity's identity ( which is the primary key of the table
).The question I have is : What is the downside if any of a table with , lets
say, 120 columns ? The principles of normalization alone do not rule out the
table deisgn in my question.
  Réponse avec citation
Vieux 04/09/2008, 12h46   #2
Uri Dimant
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Table design with respect to number of columns

Hi
).The question I have is : What is the downside if any of a table with ,
lets
> say, 120 columns ?


1) Read ability
2) Maintance
3) could be Performance also at some point

Its hard to with DESIGN issue at this forum, because only you know
what exactly business requirements should be...



"Bhaskar" <Bhaskar@discussions.microsoft.com> wrote in message
news:EFCEE672-AB4D-41E0-A00A-6FA2C1FBC0D4@microsoft.com...
>
> I am designing a table for a financial application and I have a situation
> where there are more than 100 different attributes of an entity to be
> persisted in the database. All these attributes depend directly and
> completely on the entity's identity ( which is the primary key of the
> table
> ).The question I have is : What is the downside if any of a table with ,
> lets
> say, 120 columns ? The principles of normalization alone do not rule out
> the
> table deisgn in my question.



  Réponse avec citation
Vieux 04/09/2008, 13h33   #3
Bhaskar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Table design with respect to number of columns



"Uri Dimant" wrote:

> Hi
> ).The question I have is : What is the downside if any of a table with ,
> lets
> > say, 120 columns ?

>
> 1) Read ability
> 2) Maintance
> 3) could be Performance also at some point
>
> Its hard to with DESIGN issue at this forum, because only you know
> what exactly business requirements should be...
>
>
>
> "Bhaskar" <Bhaskar@discussions.microsoft.com> wrote in message
> news:EFCEE672-AB4D-41E0-A00A-6FA2C1FBC0D4@microsoft.com...
> >
> > I am designing a table for a financial application and I have a situation
> > where there are more than 100 different attributes of an entity to be
> > persisted in the database. All these attributes depend directly and
> > completely on the entity's identity ( which is the primary key of the
> > table
> > ).The question I have is : What is the downside if any of a table with ,
> > lets
> > say, 120 columns ? The principles of normalization alone do not rule out
> > the
> > table deisgn in my question.

>
>

Hi Uri , Thanks for the reply. No , I am not particulalry seeking the design
of the table , just interested to know the drwabacks of a table with very
large number of columns. Could you elaborate on the performance point ? When
and how exactly does the performance get affected by the huge column number
in tha table ? I am never going to do a select * kind of thing.
  Réponse avec citation
Vieux 04/09/2008, 13h53   #4
Uri Dimant
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Table design with respect to number of columns

Hi
>Could you elaborate on the performance point ? When
> and how exactly does the performance get affected by the huge column
> number
> in tha table?


> I am never going to do a select * kind of thing.

Very , good that what I was thinking in terms of performance as well

Locks on table (particularly table lock) will consume more memory than
small table....


It depends on what kind of queries you are ruinnig against the table. Let
say you run SELECT statement and each time number of columns you return
has changed. Well, you need good indexes , right? And if you need to
'cover' all columns you return in order to get rid of BOOKMARK lookups
you create a covering index , but we do not want its too large? Sure you
cannot create n index to cover all columns :-))))

Well the above might be related to the maintanace more than performance




"Bhaskar" <Bhaskar@discussions.microsoft.com> wrote in message
news:5C362056-2C2E-4C5D-9116-0A2616665A79@microsoft.com...
>
>
> "Uri Dimant" wrote:
>
>> Hi
>> ).The question I have is : What is the downside if any of a table with ,
>> lets
>> > say, 120 columns ?

>>
>> 1) Read ability
>> 2) Maintance
>> 3) could be Performance also at some point
>>
>> Its hard to with DESIGN issue at this forum, because only you know
>> what exactly business requirements should be...
>>
>>
>>
>> "Bhaskar" <Bhaskar@discussions.microsoft.com> wrote in message
>> news:EFCEE672-AB4D-41E0-A00A-6FA2C1FBC0D4@microsoft.com...
>> >
>> > I am designing a table for a financial application and I have a
>> > situation
>> > where there are more than 100 different attributes of an entity to be
>> > persisted in the database. All these attributes depend directly and
>> > completely on the entity's identity ( which is the primary key of the
>> > table
>> > ).The question I have is : What is the downside if any of a table with
>> > ,
>> > lets
>> > say, 120 columns ? The principles of normalization alone do not rule
>> > out
>> > the
>> > table deisgn in my question.

>>
>>

> Hi Uri , Thanks for the reply. No , I am not particulalry seeking the
> design
> of the table , just interested to know the drwabacks of a table with very
> large number of columns. Could you elaborate on the performance point ?
> When
> and how exactly does the performance get affected by the huge column
> number
> in tha table ? I am never going to do a select * kind of thing.



  Réponse avec citation
Vieux 05/09/2008, 01h14   #5
Hugo Kornelis
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Table design with respect to number of columns

On Thu, 4 Sep 2008 04:33:01 -0700, Bhaskar wrote:

> When
>and how exactly does the performance get affected by the huge column number
>in tha table ?


SQL Server stores data in pages of approximately 8K in size. If more
bytes are required per row, less rows fit in a single data page. So more
pages have to be read (either from cache or -very slow!- from disk) for
each query.

And a smaller part of the table will be able to fit in cache.

I'd double-check the design first. That many columns in a single table
is extremely rare in a well designed and completely normalized database,
so there's a big chance that you did make some mistakes.

If the design is really correct, then you should consider splitting the
columns over two or more tables (all with the same key). Try to seperate
seldom-used columns from often used columns, and try to keep columns
that are often used together in the same table.

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h07.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12285 seconds with 13 queries