Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[ADMIN] Searching in a string with index

From: Alexander B. <burbello3000(at)yahoo.com.br>
Date: Wed Jul 25 2007 - 09:17:41 EDT


Hi,
When I search some words into a varchar column and this column has an index. Does Postgres use index??

The search is done this way:

create table tb_gen_person (
  pes_nro_doc numeric(14) not null,
  pes_name varchar(150) not null,
  constraint pk_person PRIMARY KEY(pes_nro_doc) );
create index ix_person_01 on tb_gen_person (pes_name);

select *
from tb_gen_person
where pes_name like '%albert%';

Not considering upper case, or tsearch2, this type of search use index somehow?
I overhear that if the search has more than 5 characters, probably would use index!! Is this true?

Thanks

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
                
http://www.postgresql.org/about/donate
Received on Wed Jul 25 09:20:17 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:44:35 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library