pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Short row header
3+ messages / 3 participants
[nested] [flat]

* Short row header
@ 2007-06-20 07:54 PFC <lists@peufeu.com>
  2007-06-20 08:36 ` Re: Short row header Heikki Linnakangas <heikki@enterprisedb.com>
  2007-06-20 09:05 ` Re: Short row header Gregory Stark <stark@enterprisedb.com>
  0 siblings, 2 replies; 3+ messages in thread

From: PFC @ 2007-06-20 07:54 UTC (permalink / raw)
  To: pgsql-performance


	I have this "poll results" table with just 3 integer fields, which is  
never updated, only inserted/deleted...
	Did the Devs consider an option to have VACUUM reduce the row header  
sizes for tuples that are long commited and are currently visible to all  
transactions ? (even if this makes the tuples non-updateable, as long as  
they can be deleted, it would be OK for this type of tables).
	



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Short row header
  2007-06-20 07:54 Short row header PFC <lists@peufeu.com>
@ 2007-06-20 08:36 ` Heikki Linnakangas <heikki@enterprisedb.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Heikki Linnakangas @ 2007-06-20 08:36 UTC (permalink / raw)
  To: PFC <lists@peufeu.com>; +Cc: pgsql-performance

PFC wrote:
> 
>     I have this "poll results" table with just 3 integer fields, which 
> is never updated, only inserted/deleted...
>     Did the Devs consider an option to have VACUUM reduce the row header 
> sizes for tuples that are long commited and are currently visible to all 
> transactions ?

That has been suggested before, but IIRC it wasn't considered to be 
worth it. It would only save 4 bytes (the xmin field) per tuple, the 
free space would be scattered around all pages making it less useful, 
and having to deal with two different header formats would make 
accessing the header fields more complex.

> (even if this makes the tuples non-updateable, as long as 
> they can be deleted, it would be OK for this type of tables).

That would save another 6 bytes per tuple (ctid field), but we generally 
stay away from things that impose limitations like that.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Short row header
  2007-06-20 07:54 Short row header PFC <lists@peufeu.com>
@ 2007-06-20 09:05 ` Gregory Stark <stark@enterprisedb.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Gregory Stark @ 2007-06-20 09:05 UTC (permalink / raw)
  To: PFC <lists@peufeu.com>; +Cc: pgsql-performance


"PFC" <lists@peufeu.com> writes:

> 	I have this "poll results" table with just 3 integer fields, which is
> never updated, only inserted/deleted...
> 	Did the Devs consider an option to have VACUUM reduce the row header
> sizes for tuples that are long commited and are currently visible to all
> transactions ? (even if this makes the tuples non-updateable, as long as  they
> can be deleted, it would be OK for this type of tables).

It wouldn't actually speed up anything unless the space it frees up was then
used by something. That would mean loading one of your polls into the small
bits of space freed up in every page. For most tables like this you want to do
large bulk loads and want your loads stored quickly in contiguous space so it
can be accessed quickly, not spread throughout the table.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-06-20 09:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-06-20 07:54 Short row header PFC <lists@peufeu.com>
2007-06-20 08:36 ` Heikki Linnakangas <heikki@enterprisedb.com>
2007-06-20 09:05 ` Gregory Stark <stark@enterprisedb.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox