Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: O9i: general index question
sybrandb_at_hccnet.nl schrieb am 28.03.2007 in
<3v7l03hnh3bgc08tmhkj46u3653m1a8mpo_at_4ax.com>:
> On Wed, 28 Mar 2007 17:57:21 +0200, Andreas Mosmann
> <mosmann_at_expires-31-03-2007.news-group.org> wrote:
> function based index on id_master
> decode(id_master,'0','0',null)
I tried it but Oracle did not use this Index :(
CREATE INDEX MyIndex ON TREES (DECODE(IDPARKING,'P0',NULL,IDPARKING))
because I only want to have trees on PARKINGs (about 0.01%)
> NULL values are not indexed.
now I try to replace R0 by NULL
> Obviously you where clause would need the above predicate for the FBI
> to be used (and query_rewrite should be set to true)
Sorry, I did not understand correctly. The WHERE clause is still the
following:
WHERE IDPARKING = 'P0' so I would hope it finds out that MyIndex fits.
with query_rewrite I played never before, I will try it out.
Thank you
Andreas Mosmann
-- wenn email, dann AndreasMosmann <bei> web <punkt> deReceived on Wed Mar 28 2007 - 15:14:46 CDT
![]() |
![]() |