Re: Indexing varchar fields with lower()
| От | Mitch Vincent |
|---|---|
| Тема | Re: Indexing varchar fields with lower() |
| Дата | |
| Msg-id | 01b901bfb6a7$150b02a0$4100000a@venux.net обсуждение исходный текст |
| Ответ на | Re: Why Not MySQL? (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Ответы |
Re: Indexing varchar fields with lower()
|
| Список | pgsql-hackers |
Excellent, Tom. Thanks!
It went from
ipa=# explain select * from applicants as a where a.firstname ~* '^mitch'
limit 10 offset 0;
NOTICE: QUERY PLAN:
Seq Scan on applicants a (cost=0.00..1355.54 rows=98 width=599)
EXPLAIN
ipa=#
To....
ipa=# explain select * from applicants as a where lower(a.firstname) ~
lower('^mitch') limit 10 offset 0;
NOTICE: QUERY PLAN:
Index Scan using applicants_firstname on applicants a (cost=0.00..228.47
rows=98 width=599)
EXPLAIN
On 7.0 RC5.
Could putting that function in there even though it's not 'built-in' cause
any problems that you can think of? (Mainly worried about any kind of index
corruption like I've seen before)
Thanks again!
- Mitch
В списке pgsql-hackers по дате отправления: