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.