I am quite rightly taken to task. My example was produced on 9.2.0.5.0 on Windows. I used analyze because I was being lazy. However, I have now checked dbms_stats on both 9.2.0.5 and 10.1.0.3 and got the same behaviour.
But, why would cursor_sharing make any difference?
> -- --Original Message-- -- > From: Paul Drake [mailto:bdbafh@(protected)] > Sent: 07 December 2005 01:16 > To: info2@(protected) > Subject: Re: Function based indexes?> David, > > That's an excellent example, but its missing a bit of information. > You didn't specify what version of Oracle you were working with. > > Also, you used analyze table compute statistics instead of issuring a > call to dbms_stats. > I think that Jonathan's examples have me a bit spoiled. :) > > I've used the function-based index as duct tape approach until the app > code could be fixed. I'm interested in using the approach that you > describe above instead, but I'm going to have to see how it works when > cursor_sharing!='EXACT'. I have a feeling that it won't be pretty. > > thanks, > > Paul > > Paul Drake >