Re: [postgis-users] Bad query optimizer misestimation because of - Mailing list pgsql-performance

From Markus Schaber
Subject Re: [postgis-users] Bad query optimizer misestimation because of
Date
Msg-id 42022E3D.80108@logi-track.com
Whole thread Raw
In response to Bad query optimizer misestimation because of TOAST tables  (Markus Schaber <schabios@logi-track.com>)
List pgsql-performance
Hi, all,

Markus Schaber schrieb:

> As a small workaround, I could imagine to add a small additional column
> in the table that contains the geometry's bbox, and which I use the &&
> operator against. This should avoid touching the TOAST for the skipped rows.

For your personal amusement: I just noticed that, after adding the
additional column containing the bbox and running VACUUM FULL, the table
now has a size of 4 pages, and that's enough for the query optimizer to
choose an index scan. At least that saves us from modifying and
redeploying a bunch of applications to use the && bbox query:-)

Markus
--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com

Attachment

pgsql-performance by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Tunning postgresql on linux (fedora core 3)
Next
From: Richard Huxton
Date:
Subject: Re: Tunning postgresql on linux (fedora core 3)