Re: Sequential Scan Index Bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Sequential Scan Index Bug
Дата
Msg-id 26750.1081366118@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Sequential Scan Index Bug  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-bugs
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> It's possible that we could do something more intelligent than the current
> behavior for that case but I can't come up with a particularly good
> choice that wouldn't have bad effects elsewhere.

In theory we could recognize that "integer_column = 4.35" will yield a
constant false.  If the expression were replaced by "false" during
constant folding then the planner would produce a short-circuited plan
that won't actually examine the table.

In practice, though, I don't see any way to do that that wouldn't be a
horrendous kluge.  I don't like putting special-case type-specific
knowledge into the planner; yet here we have knowledge that's not only
type-specific but specific to the combination of two different types.
Yech.  I don't see any hope for a catalog-driven, extensible approach
for such things.

You'd also have to ask questions about whether the planner time spent
testing for such cases would really be a good investment...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: INSERT INTO ... SELECT
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1129: select query returns multiple results for a japanese characters