From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dolafi, Tom <dolafit@janelia.hhmi.org>
Cc: pgsql-performance@postgresql.org, "Oleg Bartunov" <oleg@sai.msu.su>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Subject: Re: rtree/gist index taking enormous amount of space in 8.2.3
Date: Fri, 29 Jun 2007 14:38:11 -0400
Message-ID: <6932.1183142291@sss.pgh.pa.us> (raw)
In-Reply-To: <AE9860225100F14D87B26D0D4D6766DB46F42D@EXCHANGE03.janelia.priv>
References: <AE9860225100F14D87B26D0D4D6766DB46F246@EXCHANGE03.janelia.priv>
<13616.1183046917@sss.pgh.pa.us>
<AE9860225100F14D87B26D0D4D6766DB46F3E7@EXCHANGE03.janelia.priv>
<6410.1183139864@sss.pgh.pa.us>
<AE9860225100F14D87B26D0D4D6766DB46F42D@EXCHANGE03.janelia.priv>
"Dolafi, Tom" <dolafit@janelia.hhmi.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, dolafit@janelia.hhmi.org, oleg@sai.msu.su, teodor@sigaev.ru
Subject: Re: rtree/gist index taking enormous amount of space in 8.2.3
In-Reply-To: <6932.1183142291@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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