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

Re: index scan with functional indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pg(at)fastcrypt(dot)com
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: index scan with functional indexes
Date: 2004-01-27 18:02:51
Message-ID: 24803.1075226571@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Dave Cramer <pg(at)fastcrypt(dot)com> writes:
> davec=# explain analyze select * from url where fn_strrev(url) like
> '%beta12.html';

Don't you need the % at the right end to have an indexable plan?
I suspect that both of your tries so far are actually semantically
wrong, and that what you intend is

select * from url where fn_strrev(url) like fn_strrev('%beta12.html');

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-01-27 18:06:11
Subject: Re: Another optimizer question
Previous:From: Alvaro HerreraDate: 2004-01-27 18:02:03
Subject: Re: index scan with functional indexes

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