search on tables - Mailing list pgsql-admin

From Sidar Lopez Cruz
Subject search on tables
Date
Msg-id OE61JABSCu6U5QH6PyL0000473f@hotmail.com
Whole thread Raw
List pgsql-admin
why searching with like or ilike on tables with too many records is too slow?
i have a table like this
 
create table sujetos (cedula varchar(20) not null primary key, nombre varchar(255), id_tipo_documento bigint);
create index idx_nombre on sujetos (nombre);
 
and them, i insert 5,000,000 of records from mssql
 
then, i do something like that, select * from sujetos where nombre like 'LOPEZ CRUZ SIDAR%', and the request from the server is normal, but when i do this, select * from sujetos where nombre like 'lopez%sidar%';
 
the server die.... searching this string....

:-) Sidar Lopez Cruz
- Cero Riesgo, S.A.

pgsql-admin by date:

Previous
From: Robert Treat
Date:
Subject: Re: pg_dump version conflict
Next
From: "Nikolaus Dilger"
Date:
Subject: Re: search on tables