pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrus <eetasoft@online.ee>
To: pgsql-performance@postgresql.org
Subject: How to force Postgres to use index on ILIKE
Date: Mon, 5 Jun 2006 22:29:11 +0300
Message-ID: <e620mg$15jr$1@news.hub.org> (raw)

I have UTF-8 Postgres 8.1 database on W2K3

Query

SELECT toode, nimetus
FROM toode
WHERE toode      ILIKE  'x10%' ESCAPE '!'
ORDER BY UPPER(toode     ),nimetus  LIMIT 100

runs 1 minute in first time for small table size.

Toode field type is CHAR(20)

How to create index on toode field so that query can use  it ?






view thread (4+ messages)  latest in thread

Message-ID: <e620mg$15jr$1@news.hub.org>
Permalink:  ../e620mg$15jr$1@news.hub.org/
Also on:    postgresql.org/message-id/e620mg$15jr$1@news.hub.org

 · 

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: eetasoft@online.ee
  Subject: Re: How to force Postgres to use index on ILIKE
  In-Reply-To: <e620mg$15jr$1@news.hub.org>

* 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