Skip site navigation (1) Skip section navigation (2)

LIKE not using indexes (due to locale issue?)

From: Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: LIKE not using indexes (due to locale issue?)
Date: 2008-06-25 03:49:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
explain select * from d_trr where revision like '^B2.%.SX'
--where ast_revision  = 'B2.M.SX'

Seq Scan on d_trr  (cost=0.00..2268460.98 rows=1 width=16)
  Filter: ((revision)::text ~~ '^B2.%.SX'::text)

show lc_collate;

Is it that this is handled by tsearch2? Or I need to do the locale to
"C" for this to function?

the revision is indexed.

Bitmap Heap Scan on d_trr  (cost=4492.43..547709.26 rows=193453
  Recheck Cond: ((revision)::text = 'B2.M.SX'::text)
  ->  Bitmap Index Scan on idx_d_trr_iw_ast  (cost=0.00..4444.06
rows=193453 width=0)
        Index Cond: ((revision)::text = 'B2.M.SX'::text)


pgsql-general by date

Next:From: Marcelo MartinsDate: 2008-06-25 04:13:14
Subject: pg_dump estimation
Previous:From: Clemens SchwaighoferDate: 2008-06-25 03:44:01
Subject: Re: Probably been asked a hundred times before.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group