Re: Slow queries when functions are inlined

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Slow queries when functions are inlined
Дата
Msg-id 26086.1337180924@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Slow queries when functions are inlined  (Evan Martin <postgresql@realityexists.net>)
Список pgsql-general
Evan Martin <postgresql@realityexists.net> writes:
> Thanks, Tom. You mean this bit, right?
> ->  Seq Scan on _test_pos  (cost=0.00..10728.00 rows=1 width=4)
>          Filter:
> ((('0101000020E61000000000000000001C400000000000001C40'::geography &&
> _st_expand(pos, 300000::double precision)) AND ...

> I tried to find some info on selectivity estimation functions, but only
> came up with
> http://www.postgresql.org/docs/9.1/static/xoper-optimization.html which
> talks about operators. Is there something similar for functions? Or does
> the rows estimate come from the PostGIS && operator that's used
> internally by ST_DWithin? Just trying to understand this better so I
> know what to ask on the PostGIS list.

Yeah, the _st_dwithin calls are probably also getting default estimates,
so this must be mostly on the head of the && calls.  You could try
EXPLAIN ANALYZEs with just these individual filter conditions to see
which ones are far off.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Query regarding Intersect clause
Следующее
От: John Townsend
Дата:
Сообщение: Libpq question