All entries for Friday 20 January 2006
January 20, 2006
Writing about web page http://www.oracle.com/technology/pub/columns/trute_unicode.html
Oracle9i introduced length semantics, which provides the choice of whether to declare strings in terms of characters or bytes. Byte semantics is still the default, and character-length semantics can be declared at column, table, session, and for the entire database. Length semantics makes storage management more intuitive and allows a common database schema to run successfully on different databases with different character sets. This makes migrating applications and databases to Unicode much simpler.
One big query, join 5 tables. Oracle choose full table scan( and use hash join). It refuses to use indexes on those table and nested loop. It is one order of magnitude slower than the one using index.
I can use hint nse_nl to force it use nested loop. Oracle then correctly use indexes.
I changed the optimizer_indx_adj to a small value, oracle use some of the index, not all.
I then change the optimizer value from choose to first_rows_1000. It magically works now.