Re: [postgis-users] Bad query optimizer misestimation because of

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: [postgis-users] Bad query optimizer misestimation because of
Дата
Msg-id 42022E3D.80108@logi-track.com
обсуждение исходный текст
Ответ на Bad query optimizer misestimation because of TOAST tables  (Markus Schaber <schabios@logi-track.com>)
Список 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

Вложения

В списке pgsql-performance по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Tunning postgresql on linux (fedora core 3)
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Tunning postgresql on linux (fedora core 3)