Re: Perplexing Query Performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Perplexing Query Performance
Дата
Msg-id 15524.1018966922@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Perplexing Query Performance  (mdklatt@ou.edu (Michael Klatt))
Список pgsql-general
mdklatt@ou.edu (Michael Klatt) writes:
> select *
> from daily_rainfall as p, sites as s
> where p.site = s.ident and s.latitude >= -90 and s.latitude <= 90 and
>   s.longitude >= -180 and terrain in ('A', 'I', 'L');

> Almost any combination of 'A', 'I', and/or 'L' consistently executes
> in the same time, but if it's ONLY 'A' PostgreSQL seems to go off into
> Never Never Land.  There is no problem if 'I' or 'L' is used alone,
> just 'A'.

Sounds to me like it's switching from a good query plan to a bad one...
but since you haven't shown us EXPLAIN output nor described the
available indexes, it's hard to say much.

            regards, tom lane

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

Предыдущее
От: Maurice Balick
Дата:
Сообщение: Re: index problem (uses one index but not the other)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Testers needed ...