BUG #6719: PG shouldn't filter on same criteria as index search

From: blove319(at)hotmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6719: PG shouldn't filter on same criteria as index search
Date: 2012-07-05 18:19:39
Message-ID: E1SmqeR-0000x3-RI@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 6719
Logged by: BLove
Email address: blove319(at)hotmail(dot)com
PostgreSQL version: 9.1.3
Operating system: Centos 5
Description:

After doing an equality search on an indexed field, PG is doing a filter on
the same value using a regex. That appears to be a useless operation that
will only consume cpu cycles.

explain select * from transactions.subscriber_504700_txns_y2012m05 lh where
lh.account_code LIKE '34016975\_DAT\_FR\_HF';
QUERY PLAN

----------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using idx_subscriber_504700_txns_y2012m05_account_code on
subscriber_504700_txns_y2012m05 lh (cost=0.00..17.02 rows=3 width=131)
Index Cond: (account_code = '34016975_DAT_FR_HF'::text)
Filter: (account_code ~~ '34016975\_DAT\_FR\_HF'::text)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-07-05 18:42:57 Re: BUG #6715: 9.2b2 psql \ir does not understand leading ../
Previous Message Craig Ringer 2012-07-05 16:15:06 Re: Problem with pg_upgrade