Does postgresql 9.0.4 use index on PREFIX%SUFFIX queries?

From: "Edson Carlos Ericksson Richter" <richter(at)simkorp(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Does postgresql 9.0.4 use index on PREFIX%SUFFIX queries?
Date: 2011-09-26 12:16:40
Message-ID: 003601cc7c46$270a8ea0$751fabe0$@com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear experts,

I have the following query:

select * from notafiscal where numeroctc like ‘POA%34345’;

Prefix is normally 3 characters, suffix varyies.

Is Postgresql 9.0.4 able to use an BTREE index on notafiscal.numeroctc to
execute this query?

Should I create GIST index or something else to speed up the query?

Thanks,

Edson Carlos Ericksson Richter
SimKorp Infomática Ltda

Fone:

(51) 3366-7964

Celular:

(51) 8585-0796

Embedded Image

<http://www.simkorp.com.br/> www.simkorp.com.br

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Venkat Balaji 2011-09-26 12:49:50 Re: : PostgreSQL Online Backup
Previous Message Albe Laurenz 2011-09-26 11:49:45 Re: Sending Results From One Function As Input into Another Function