[NOVICE] Sparse Data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[NOVICE] Sparse Data

Walker, Jed S
Sparse Data

Does sparse data cause significant space wastage or performance issues in PostgreSQL?

We are building an application that stores assets. Each different type of asset has different attributes and in initial design we decided to store each attribute in separate tables to avoid having a lot of sparse data. It turns out, after many revisions and working throught the asset definitions, that are more similar than we thought, but still not very alike. This is making me rethink splitting them out into separate tables.

Given that PostgreSQL writes new blocks when a block changes (instead of updating the block), it made me wonder if sparse data is really an issue in PostgreSQL (because if it always writes a new block to replace a block that has changed, then it wouldn't have to waste any or much space).

Any input or knowledge would be great,

Thanks,


Jed S. Walker




Reply | Threaded
Open this post in threaded view
|

Re: [NOVICE] Sparse Data

Tom Lane-2
"Walker, Jed S" <[hidden email]> writes:
> Does sparse data cause significant space wastage or performance issues
> in PostgreSQL?

What do you mean by "sparse data" exactly?  If you're thinking of a
table in which many fields are null, no, there's no penalty for that.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq
Reply | Threaded
Open this post in threaded view
|

Re: [NOVICE] Sparse Data

Walker, Jed S
In reply to this post by Walker, Jed S
Yes, that is what I'm referring to. Thanks!

-----Original Message-----
From: Tom Lane [mailto:[hidden email]]
Sent: Tuesday, May 24, 2005 11:14 AM
To: Walker, Jed S
Cc: [hidden email]
Subject: Re: [NOVICE] Sparse Data

"Walker, Jed S" <[hidden email]> writes:
> Does sparse data cause significant space wastage or performance issues

> in PostgreSQL?

What do you mean by "sparse data" exactly?  If you're thinking of a
table in which many fields are null, no, there's no penalty for that.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org