I'm not sure if I use the index for a case-insensitive search the right
way. It is a table with about 45000 records, pers_id is the primary key,
pers_nachname is a character varying which should have an case-insensitive
EXPLAIN SELECT * FROM kundepersonhc WHERE pers_id=42612;
says that the index for the primary key is used
EXPLAIN SELECT * FROM kundepersonhc WHERE UPPER(pers_nachname) LIKE
says that a seq scan is done.
I used this statement to define the index:
CREATE INDEX kundepersonhc_upper_pers_nachname ON kundepersonhc
What did you wrong here?
pgsql-novice by date
|Next:||From: Tom Lane||Date: 2006-07-19 14:49:24|
|Subject: Re: Query optimization / automatic re-ordering of tables |
|Previous:||From: Verena Ruff||Date: 2006-07-19 12:53:37|
|Subject: Query optimization / automatic re-ordering of tables|