Re: Very slow query - why?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Very slow query - why?
Дата
Msg-id 9221.1075733630@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Very slow query - why?  (Richard Schilling <rschi@rsmba.biz>)
Список pgsql-general
Richard Schilling <rschi@rsmba.biz> writes:
> Looking at your query, I notice that the longer query happens when you
> search on b.zcustnum=30538 while the LEFT OUTER JOIN remains the same.
> It could be that when testing a.zcustnum=30530 the server can short
> circuit the logic - it only has to check a.zcustnum to see if the
> entire tuple should be selected.

Also note that the planner has gotten successively smarter about outer
joins in each of the past several releases.  Without knowing which PG
version this is (and it ain't "PostgreSQL 4.3" as alleged in the OP's
message...), and without seeing EXPLAIN ANALYZE results, it's hard to
speculate about what's going on.

            regards, tom lane

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

Предыдущее
От: Terry Lee Tucker
Дата:
Сообщение: Return Value of a Function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Array in stored procedure