Re: index scan with functional indexes - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: index scan with functional indexes
Date
Msg-id 20040127180203.GB22417@dcc.uchile.cl
Whole thread Raw
In response to Re: index scan with functional indexes  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-hackers
On Tue, Jan 27, 2004 at 12:41:41PM -0500, Dave Cramer wrote:

> davec=# explain analyze select * from url where fn_strrev(url) like
> '%beta12.html';

Reverse the constant too:

davec=# explain analyze select * from url where fn_strrev(url) like
fn_strrev('%beta12.html');

You won't get an indexscan if you have a % in front of the string.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Hay quien adquiere la mala costumbre de ser infeliz" (M. A. Evans)


pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: index scan with functional indexes
Next
From: Tom Lane
Date:
Subject: Re: index scan with functional indexes