Re: Space required for an empty varchar field?
From: Harag (haragREMOVETHESECAPITALS_at_softhome.net)
Date: 08/29/04
- Next message: David Portas: "Re: commit"
- Previous message: Harag: "Re: Go to specified row"
- In reply to: Hugo Kornelis: "Re: Space required for an empty varchar field?"
- Next in thread: Hugo Kornelis: "Re: Space required for an empty varchar field?"
- Reply: Hugo Kornelis: "Re: Space required for an empty varchar field?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 29 Aug 2004 11:04:02 +0100
On Sat, 28 Aug 2004 23:17:46 +0200, Hugo Kornelis
<hugo@pe_NO_rFact.in_SPAM_fo> wrote:
>On Sat, 28 Aug 2004 10:56:01 +0100, Harag wrote:
>
>>To the other gurus replying.
>>
>>Whats the problem of splitting the table into 2 tables?
>>
>>TABLE 1
>>memID int identify<pk>
>>memName varchar(30)
>>MemDOB smalldatetime
>>... etc
>>
>>
>>TABLE 2
>>MemID int <pk>
>>MemNotes varchar(500)
>>
>>
>>
>>then in the SELECTS left join the 2 tables together on MemID where the
>>notes will be needed? table 2 would only hold the rows where there are
>>actual notes.
>>
>>Al.
>
>Hi Al,
>
>The upside: Less space lost for storing the length of the varchar column
>and the NULL bit. Less problems caused by queries written by programmers
>who don't understand how to deal with NULLS.
>
>The downside: More space lost for storing MemID in another table as well.
>Some queries get more complicated (need to join in one more table - this
>will often have to be an outer join). Correct handling of NULLS in queries
>remains a necessity, as they'll be in the result set of an outer join.
>
>Plus, it gets unwieldy fast if you have multiplle NULLable columns. I'd
>only consider it if I had multiple columns that are either all NULL or all
>non-NULL, but that's just my personal opinion.
>
>Best, Hugo
Thanks Hugo.
In the above table layout if MemNotes was the only varchar (nullable)
then would you add it to the original table? and make it one table.
Al.
- Next message: David Portas: "Re: commit"
- Previous message: Harag: "Re: Go to specified row"
- In reply to: Hugo Kornelis: "Re: Space required for an empty varchar field?"
- Next in thread: Hugo Kornelis: "Re: Space required for an empty varchar field?"
- Reply: Hugo Kornelis: "Re: Space required for an empty varchar field?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|