How to force Postgres to use index on ILIKE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ?





[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux