| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
|---|---|
| To: | deepthroat <dblackbeer(at)gmail(dot)com> |
| Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
| Subject: | Re: clausula ilike |
| Date: | 2005-10-18 17:25:24 |
| Message-ID: | 20051018172524.GF26981@surnet.cl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-es-ayuda |
deepthroat escribió:
> Cuando utilizo la clausula ilike jamas usa índices?
Efectivamente. Para poder hacer busquedas sin sensibilidad a mayusculas
y que al mismo tiempo puedan usar un indice, crea un indice funcional en
to_upper(columna) y luego haces las consultas de la misma forma:
where to_upper(columna) = to_upper('alguna palabra')
Observa que no puedes usar comodines en este caso ... no estoy seguro si
se usara el indice cuando haces
where to_upper(columna) like to_upper('alguna palabra%')
--
Alvaro Herrera http://www.amazon.com/gp/registry/CTMLCN8V17R4
"Now I have my system running, not a byte was off the shelf;
It rarely breaks and when it does I fix the code myself.
It's stable, clean and elegant, and lightning fast as well,
And it doesn't cost a nickel, so Bill Gates can go to hell."
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mario Gonzalez | 2005-10-18 17:37:48 | Re: Suscribe Postgresql-es Ayuda |
| Previous Message | Alvaro Herrera | 2005-10-18 17:23:34 | Re: Suscribe Postgresql-es Ayuda |