Comments on: Look Ma, no FBI (Function Based Index) http://technology.amis.nl/2006/09/07/look-ma-no-fbi-function-based-index/?utm_source=rss&utm_medium=rss&utm_campaign=look-ma-no-fbi-function-based-index Friends of Oracle and Java Sun, 31 Aug 2014 06:57:42 +0000 hourly 1 http://wordpress.org/?v=3.9.2 By: Mr. Ed http://technology.amis.nl/2006/09/07/look-ma-no-fbi-function-based-index/#comment-3801 Fri, 08 Sep 2006 12:10:28 +0000 http://technology.amis.nl/blog/?p=1324#comment-3801 A little info on SYS_NC00014$.

]]>
By: Viliam http://technology.amis.nl/2006/09/07/look-ma-no-fbi-function-based-index/#comment-3800 Fri, 08 Sep 2006 11:30:12 +0000 http://technology.amis.nl/blog/?p=1324#comment-3800 You were wondering, why FBI was not used before you created statistics. It was because RBO does not consider FBIs. That database apparently had the default optimizer set to RBO. CBO is default, when there are statistics for some of tables in the query. If you used the hint /*+first_rows*/, the FBI would be used even without statistics…

And if you have FBI on upper(column), it cannot be used for searching without upper function. Workaround could be to put both conditions: column=:x and upper(column)=:x.

INDEX FAST FULL SCAN means that whole index is read. It could be used because only columns used in index were read in the select list, so there was no need to read whole table with (probably) lot more columns. If you used “select *”, you will get TABLE FULL SCAN… It’s misleading to say that “index was used” with IFFS – it’s still full scan, but little less data (but more than a table, because of PCTFREE).

You can think of an index as of a table physically sorted, and of an FBI as of a MV physically sorted…

]]>
By: Patrick Sinke http://technology.amis.nl/2006/09/07/look-ma-no-fbi-function-based-index/#comment-3799 Fri, 08 Sep 2006 09:19:20 +0000 http://technology.amis.nl/blog/?p=1324#comment-3799 Cool stuff indeed!
But what I don’t get… does the optimizer look for all the occurrences in the index which would be found when the function would not be applied on the column and apply the function on the result of that index scan? Or is there another mechanism in play?
I thought dynamic sampling was used to take a guess at un-indexed tables, but apparently it also uses tricks to optimize the use of existing indexes. Awesome!

]]>
By: Lucas Jellema http://technology.amis.nl/2006/09/07/look-ma-no-fbi-function-based-index/#comment-3798 Fri, 08 Sep 2006 07:23:09 +0000 http://technology.amis.nl/blog/?p=1324#comment-3798 That is pretty cool! That means that the contents of a Function (or probably better defined as Expression) Based Index is available to us as a sort of cache of precalculated values!

In the article Smart denormalization and Enhanced PL/SQL Function Call performance – Comparing Function Based Index and Materialized Views on our weblog, I compare Materialized Views and Function Based Index, and suggested (erroneously as you demonstrate) that only the MV provides a cache of precalculated values that is automatically maintained and that is accessible to us. Apparently, the same applies to FBI!

Thanks for the analysis and the clear conclusions.

Lucas

]]>