![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
I created an index for a table, say Entity, on a field, say id. Then, the follwoing two SQL has different result: select * from "Entity" e where e.id = '1000' select * from "Entity" e where e.id like '1000' |
|
(The later uses sequential scan. BTW, while 7.4.x uses index why 8.0 behave worse?) |
|
Once I re-index it, the problem is gone. However, the problem comes back randomly if I change some id. |
|
The above can be replicated by using pgAdmin III only. |
#3
| |||
| |||
|
|
-----Original Message----- From: pgsql-bugs-owner (AT) postgresql (DOT) org=20 [mailto gsql-bugs-owner (AT) postgresql (DOT) org] On Behalf Of Richard HuxtonSent: 21 February 2005 15:37 To: Tom Yeh Cc: pgsql-bugs (AT) postgresql (DOT) org Subject: Re: [BUGS] BUG #1487: Index problem =20 The above can be replicated by using pgAdmin III only. =20 Are you saying it doesn't do this from psql? |
#4
| |||
| |||
|
|
-----Original Message----- From: pgsql-bugs-owner (AT) postgresql (DOT) org [mailto gsql-bugs-owner (AT) postgresql (DOT) org] On Behalf Of Richard HuxtonSent: 21 February 2005 15:37 To: Tom Yeh Cc: pgsql-bugs (AT) postgresql (DOT) org Subject: Re: [BUGS] BUG #1487: Index problem The above can be replicated by using pgAdmin III only. Are you saying it doesn't do this from psql? pgAdmin uses libpq, just as psql does, so I cannot imagine why this would be the case. pgAdmin also does not do anything to try to affect query plans in any way. |
#5
| |||
| |||
|
|
-----Original Message----- From: Richard Huxton [mailto:dev (AT) archonet (DOT) com]=20 Sent: 21 February 2005 16:13 To: Dave Page Cc: Tom Yeh; pgsql-bugs (AT) postgresql (DOT) org Subject: Re: [BUGS] BUG #1487: Index problem =20 pgAdmin uses libpq, just as psql does, so I cannot imagine why this would be the case. pgAdmin also does not do anything to try=20 to affect query plans in any way. =20 Could it set the encoding/locale differently to psql (on the=20 same machine)? |
#6
| |||
| |||
|
|
Yes, it really depends on Locale. If I created a database with Locale = C, the problem won't happen (at least so far). BTW, I forgot to mention I tested with some Chinese and Japanese characters. However, it raises another issue why a wrong Locale would damage index? It shall only affect records with wrong conversion, not something like '1000'. |
#7
| |||
| |||
|
|
-----Original Message----- From: Richard Huxton [mailto:dev (AT) archonet (DOT) com] Sent: 21 February 2005 16:13 To: Dave Page Cc: Tom Yeh; pgsql-bugs (AT) postgresql (DOT) org Subject: Re: [BUGS] BUG #1487: Index problem pgAdmin uses libpq, just as psql does, so I cannot imagine why this would be the case. pgAdmin also does not do anything to try to affect query plans in any way. Could it set the encoding/locale differently to psql (on the same machine)? |
![]() |
| Thread Tools | |
| Display Modes | |
| |