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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: blove319(at)hotmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6719: PG shouldn't filter on same criteria as index search
Date: 2012-07-05 23:02:19
Message-ID: 2789.1341529339@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

blove319(at)hotmail(dot)com writes:
> 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.

Getting rid of the filter expression isn't really worth the trouble.

If we had done the transformation of regexes to index conditions in a
different way, it might be practical to suppress the redundant test,
but given the way the code is structured we can't easily.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig Ringer 2012-07-06 00:12:30 Re: BUG #6720: Its often disconnecting
Previous Message Tom Lane 2012-07-05 22:28:31 Re: Problem with pg_upgrade