hi,i ran a query with ILIKE but it doesn't use the index.but i tried following method, and it worked. there is 3 extra lower() overhead but i don't think it will effect the performance.CREATE INDEX index_name ON mytable (lower(column) varchar_pattern_ops);
SELECT * FROM mytable WHERE lower(column)
Hi,Can this technique work with case insensitive ILIKE?It didn't seem to use the index when I used ILIKE instead of LIKE.Thanks, Brendan Duddridge | CTO | 403-277-5591 x24 | [EMAIL PROTECTED] ClickSpace Interactive Inc. Suite L1
this trick did the job. thanks.On 2/21/06, Alvaro Herrera <[EMAIL PROTECTED]> wrote:
Scott Marlowe wrote:> On Tue, 2006-02-21 at 09:57, Ibrahim Tekin wrote:> > hi,
> > i have btree index on a text type field. i want see rows which starts> > with certain characters on that field. so i write a query
my database encoding is unicode.
i have two table, one is 3.64gb on hdd and has 2.2 million records. it takes 140 secs to run on my AMD Turion 64 M 800MHz/1GB laptop.second table is 1.2gb, 22 records, and takes 56 secs to run.explain says 'Seq Scan on mytable, ..'
On 2/21/06, [EMAIL PROTECTED]
On Tue, Feb 21, 2006 at 05:57:12PM +0200, Ibrahim Tekin wrote:
> i have btree index on a text type field. i want see rows which starts with
> certain characters on that field. so i write a query like this:
> SELECT * FROM mytable WHERE myfield LIKE 'john%'
> since this condition is from start o
On Tue, 2006-02-21 at 10:34, Alvaro Herrera wrote:
> Scott Marlowe wrote:
> > On Tue, 2006-02-21 at 09:57, Ibrahim Tekin wrote:
> > > hi,
> > > i have btree index on a text type field. i want see rows which starts
> > > with certain characters on that field. so i write a query like this:
> > >
> >
Scott Marlowe wrote:
> On Tue, 2006-02-21 at 09:57, Ibrahim Tekin wrote:
> > hi,
> > i have btree index on a text type field. i want see rows which starts
> > with certain characters on that field. so i write a query like this:
> >
> > SELECT * FROM mytable WHERE myfield LIKE 'john%'
> >
> > sinc
On Tue, 2006-02-21 at 09:57, Ibrahim Tekin wrote:
> hi,
> i have btree index on a text type field. i want see rows which starts
> with certain characters on that field. so i write a query like this:
>
> SELECT * FROM mytable WHERE myfield LIKE 'john%'
>
> since this condition is from start of the
hi,i have btree index on a text type field. i want see rows which starts with certain characters on that field. so i write a query like this:SELECT * FROM mytable WHERE myfield LIKE 'john%'since this condition is from start of the field, query planner should use index to find such elements but expl