| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Ace" <a_s(at)poczta(dot)fm> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: Optimizer bug in UPDATE with subselect |
| Date: | 2003-01-22 21:46:26 |
| Message-ID: | 24461.1043271986@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
"Ace" <a_s(at)poczta(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hubert depesz Lubaczewski | 2003-01-23 14:35:03 | misleading error message |
| Previous Message | Lamar Owen | 2003-01-22 21:20:57 | Re: Unable to Install PostGreSQL on Red Hat Linux release 7.2 |