Re: Optimizer bug in UPDATE with subselect

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Optimizer bug in UPDATE with subselect
Дата
Msg-id 24461.1043271986@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Optimizer bug in UPDATE with subselect  ("Ace" <a_s@poczta.fm>)
Список pgsql-bugs
"Ace" <a_s@poczta.fm> writes:
> I've upgraded my DB to 7.3.1 from 7.2. The following update causes the SEQ
> SCAN instead of INDEX SCAN (in 7.2 there was no bug like that):

I don't believe that.  No version of Postgres would have generated an
index scan on this query, because you've got a type mismatch: ident
is declared char(50) but the result of the trim()||trim() expression
will be of type text.

I'd recommend changing all the column datatypes from char(N) to text.
Then you could get rid of the trim() calls, and save yourself a bunch
of disk space too.  Those trailing spaces aren't free.

            regards, tom lane

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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: Unable to Install PostGreSQL on Red Hat Linux release 7.2
Следующее
От: Hubert depesz Lubaczewski
Дата:
Сообщение: misleading error message