Re: Avoid huge perfomance loss on string concatenation

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Avoid huge perfomance loss on string concatenation
Дата
Msg-id 20071206172444.GA17812@svana.org
обсуждение исходный текст
Ответ на Re: Avoid huge perfomance loss on string concatenation  ("Andrus" <kobruleht2@hot.ee>)
Список pgsql-general
On Wed, Dec 05, 2007 at 11:32:59AM +0200, Andrus wrote:
> I do'nt have this index.
> dok.kuupaev||dok.kellaaeg conditon should applied after index search is
> performed.
> It filters out only a small number of rows additionally to the plain kuupaev
> filter.
> So adding index on dok.kuupaev||dok.kellaaeg  is not reasonable IMHO.

Your problem is that it is doing that, except postgres is assuming that
it does filter more rows. In actual fact the extra condition is making
no difference whatsoever.

So postgres assumes the result will only give 10 rows and so a nested
loop is better.

As for the index problem, I don't know but it will probably work better.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Nested loop in simple query taking long time
Следующее
От: SHARMILA JOTHIRAJAH
Дата:
Сообщение: record-based log shipping