Skip site navigation (1) Skip section navigation (2)

Re: Proposal for Null Bitmap Optimization(for TrailingNULLs)

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>, pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal for Null Bitmap Optimization(for TrailingNULLs)
Date: 2007-12-17 14:12:57
Message-ID: 1197900777.12912.110.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Mon, 2007-12-17 at 08:47 -0500, Andrew Dunstan wrote:

> This strikes me as such a corner case that it's likely not to be worth it.
> 
> If you really want to save space along these lines, one better place to 
> start might  be mutable with column ordering - see 
> http://archives.postgresql.org/pgsql-hackers/2006-12/msg00983.php . That 
> would mean that we would be able to move nullable columns physically to 
> the tail which in turn might help this suggestion have more effect.

Could be a good idea.

Currently on a 64-bit system we occupy 23 bytes for row header, so any
table with more than 8 columns will cause the null bitmap to overflow
and for us to use another 8 bytes.

OP's idea could avoid that in many cases, so the saving isn't 1 byte it
is fairly frequently going to be an 8 byte saving.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


In response to

Responses

pgsql-hackers by date

Next:From: Andrew SullivanDate: 2007-12-17 14:44:10
Subject: Re: Negative LIMIT and OFFSET?
Previous:From: Alvaro HerreraDate: 2007-12-17 13:48:31
Subject: pgsql: Improve wording.

pgsql-patches by date

Next:From: Gregory StarkDate: 2007-12-17 14:52:59
Subject: Re: Proposal for Null Bitmap Optimization(for TrailingNULLs)
Previous:From: Andrew DunstanDate: 2007-12-17 13:47:54
Subject: Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group