pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sidar Lopez Cruz <sidarlopez@hotmail.com>
To: pgsql-admin@postgresql.org
Subject: search on tables
Date: Wed, 26 Mar 2003 16:26:35 -0600
Message-ID: <OE61JABSCu6U5QH6PyL0000473f@hotmail.com> (raw)

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.

view thread (2+ messages)  latest in thread

Message-ID: <OE61JABSCu6U5QH6PyL0000473f@hotmail.com>
Permalink:  ../OE61JABSCu6U5QH6PyL0000473f@hotmail.com/
Also on:    postgresql.org/message-id/OE61JABSCu6U5QH6PyL0000473f@hotmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sidarlopez@hotmail.com
  Subject: Re: search on tables
  In-Reply-To: <OE61JABSCu6U5QH6PyL0000473f@hotmail.com>
  References: <OE61JABSCu6U5QH6PyL0000473f@hotmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox