Function-based index

A function-based index indexes a funciton’s return value.
It can be a:

  • Built-in SQL function
  • PL/SQL function
  • A user-written function

It relieves the server from having to invoke the function for every key value as it performs a search on the indxed expression.

For example:

CREATE INDEX table1_ix ON TABLE1(my_function(column1, column2));

Now any query that contains the expression my_function(column1, column2) in the WHERE clause may be able to take advantage of this index (otherwise, it would force a full table scan)

March 31, 2008. index, performance. Leave a comment.

7-29. B-Tree index leaf entry characteristics

In a B-tree index on a nonpartitioned table:

  • Key value are repeated if there are multiple rows that have the same key value unless the index is compressed
  • There is no index entry corresponding to a row that has all key columns that are NULL. Therefore, a WHERE clause specifying NULL will always result in a full table scan.
  • Restricted ROWID is used to point to the rows of the table because all rows belong to the same segment.

March 31, 2008. index, performance. Leave a comment.

1-19. Data block size

The size of the data block can be set at the time of the creation of the database. The default size of 8 KB is adequate for most databases. If your database supports a data warehouse application that has large tables and indexes, then a larger block size may be beneficial.
If your database supports a transactional application where reads and writes are random, then specifying a smaller block size may be beneficial.
The maximum block size depends on your OS. The minimum Oracle block size is 2 KB and should rarely (if ever) be used.

March 3, 2008. data block, performance. Leave a comment.