search on tables

Поиск
Список
Период
Сортировка
От Sidar Lopez Cruz
Тема search on tables
Дата
Msg-id OE61JABSCu6U5QH6PyL0000473f@hotmail.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: pg_dump version conflict
Следующее
От: "Nikolaus Dilger"
Дата:
Сообщение: Re: search on tables