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

Re: rtree/gist index taking enormous amount of space in 8.2.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dolafi, Tom" <dolafit(at)janelia(dot)hhmi(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org, "Oleg Bartunov" <oleg(at)sai(dot)msu(dot)su>, "Teodor Sigaev" <teodor(at)sigaev(dot)ru>
Subject: Re: rtree/gist index taking enormous amount of space in 8.2.3
Date: 2007-06-29 18:38:11
Message-ID: 6932.1183142291@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Dolafi, Tom" <dolafit(at)janelia(dot)hhmi(dot)org> writes:
> In the mean time I've dropped the index which has resulted in overall
> performance gain on queries against the table, but we have not tested
> the part of the application which would utilize this index.

I noted that with the same (guessed-at) distribution of fmin/fmax, the
index size remains reasonable if you change the derived boxes to

CREATE OR REPLACE FUNCTION boxrange(integer, integer)
  RETURNS box AS
    'SELECT box (point($1, $1), point($2, $2))'
  LANGUAGE 'sql' STRICT IMMUTABLE;

which makes sense from the point of view of geometric intuition: instead
of a bunch of very tall, mostly very narrow, mostly overlapping boxes,
you have a bunch of small square boxes spread out along a line.  So it
stands to reason that a geometrically-motivated index structure would
work a lot better on the latter.  I don't know though whether your
queries can be adapted to work with this.  What was the index being used
for, exactly?

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Dolafi, TomDate: 2007-06-29 18:44:31
Subject: Re: rtree/gist index taking enormous amount of space in 8.2.3
Previous:From: Tom LaneDate: 2007-06-29 18:30:09
Subject: Re: rtree/gist index taking enormous amount of space in 8.2.3

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