Re: Space taken by Null values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Basant Dagar wrote
> Gurus--
> 
> I have big flat table with 100 columns in it. For about 40% of its data,
> 90
> columns would be null out of 100.And  this table keeps growing and will
> initial have more than 100 million rows.
> 
> ​May I know, will this impact the size in  anyways as I heard nulls will
> take no or very little space in PostgreSQL unlike oracle. even for
> millions
> of rows with many columns in it. Is that true?
> 
> 
> ​And if that is not true, would you recommend to make this table into 2
> tables with the 2nd table containing those ​40% records with only 10
> required columns in it?

IIRC a single null occupies one bit.

I would indeed expect to be able to create two tables and minimize or
eliminate the number of columns defined to allow NULL.  If that is what you
are thinking (your question is unclear on this point) then go ahead; keeping
mind that I obviously have no clue what any of those 100 columns is...

David J.



--
View this message in context: http://postgresql.nabble.com/Space-taken-by-Null-values-tp5836008p5836010.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux