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

About b-tree usage

From: Ioannis Theoharis <theohari(at)ics(dot)forth(dot)gr>
To: pgsql-hackers(at)postgresql(dot)org
Subject: About b-tree usage
Date: 2005-03-06 21:33:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Please let me know, if there is any option in postgresql to achieve the
following usage of a b-tree index:

For a relation R(att0, att1) and a btree index on attribute att0

In each insertion of a tuple on table:
- look on index if the value of att0 of new entry does already exist in
  index, and
	- if no, allow the aprorpiate entry on b-tree
	- if yes, do not allow an entry.

In my aplication i have always my relation clustered according to att0.
And the only information needed for a query with a range condition over
att0 in WHERE clause, is the place on disc where the first tuple with a
given value on att0 is placed.

The hint, is that beacause of too many raws of table, the index size is
too big. But the number of discrete values of att0 is orders of
magnitudes smaller than the number of tuples.

I try to investigate, if there is a way to use an alternative of b-tree
index, to decrease the blocks of indexed that are fetched into memory.



pgsql-hackers by date

Next:From: Jeff DavisDate: 2005-03-06 22:45:34
Subject: Re: About b-tree usage
Previous:From: Pavel StehuleDate: 2005-03-06 20:51:49
Subject: Re: Implementation of SQLCODE and SQLERRM variables for

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