case-insensitive Index

Поиск
Список
Период
Сортировка
От Verena Ruff
Тема case-insensitive Index
Дата
Msg-id 19682.86.59.55.246.1153314443.squirrel@v2830.vanager.de
обсуждение исходный текст
Ответы Re: case-insensitive Index  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hello,

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
index.

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
UPPER('me%');
says that a seq scan is done.

I used this statement to define the index:
CREATE INDEX kundepersonhc_upper_pers_nachname ON kundepersonhc
(UPPER(pers_nachname));

What did you wrong here?

Regards,
Verena


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

Предыдущее
От: "Verena Ruff"
Дата:
Сообщение: Query optimization / automatic re-ordering of tables
Следующее
От: "Glenn"
Дата:
Сообщение: wild cards in pg_hba.conf