pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Greg Caulton <caultonpos@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: cant get an index scan with a LIKE
Date: Mon, 06 Oct 2008 18:59:33 -0500
Message-ID: <48EA6015.EE98.0025.0@wicourts.gov> (raw)
In-Reply-To: <e44fb6470810061647x6b09cee0q4c2e320e78aff97e@mail.gmail.com>
References: <e44fb6470810061647x6b09cee0q4c2e320e78aff97e@mail.gmail.com>

>>> "Greg Caulton" <caultonpos@gmail.com> wrote: 
 
> but I get a sequential scan when I do where term_index like
> 
> select * from sct_descriptions where term_index like 'CHILLS AND
FEVER
> (FINDING)'
 
> Is there anything else I can do?  Settings below, this is PostgreSQL
8.3
 
> "lc_collate";"English_United States.1252"
> "lc_ctype";"English_United States.1252"
> "lc_messages";"English_United States"
> "lc_monetary";"English_United States"
> "lc_numeric";"English_United States"
> "lc_time";"English_United States"
 
This issue is discussed here:
 
http://www.postgresql.org/docs/8.2/interactive/locale.html
 
with a solution to your specific problem mentioned here:
 
http://www.postgresql.org/docs/8.2/interactive/indexes-opclass.html
 
You can create an index with the appropriate operator type to get LIKE
to work as you want.  I hope this helps.
 
-Kevin



view thread (3+ messages)  latest in thread

Message-ID: <48EA6015.EE98.0025.0@wicourts.gov>
Permalink:  ../48EA6015.EE98.0025.0@wicourts.gov/
Also on:    postgresql.org/message-id/48EA6015.EE98.0025.0@wicourts.gov

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, caultonpos@gmail.com
  Subject: Re: cant get an index scan with a LIKE
  In-Reply-To: <48EA6015.EE98.0025.0@wicourts.gov>

* 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