Prev | Current Page 252 | Next

Rick Greenwald, Robert Stackowiak, Jonathan Stern

"Oracle Essentials: Oracle Database 11g"

For instance, the optimizer
could be trying to decide between two indexes to use in an execution plan that
involves a selection based on a value in either index. The rule-based optimizer might
very well rate both indexes equally and resort to the order in which they appear in
the WHERE clause to choose an execution plan. The cost-based optimizer, however,
knows that one index contains 1,000 entries while the other contains 10,000
entries. It even knows that the index that contains 1,000 values contains only 20
unique values, while the index that contains 10,000 values has 5,000 unique values.
The selectivity offered by the larger index is much greater, so that index will be
assigned a better optimization score and used for the query.
In Oracle9i, youhave the option of allowing the cost-based optimizer to use CPU
speed as one of the factors in determining the optimal execution plan. An initialization
parameter turns this feature on and off. As of Oracle Database 10g, the default
cost basis is calculated on the CPU cost plus the I/O cost for a plan.


Pages:
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
noclegi hel tanie pensjonaty nad morzem Lokaty jednodniowe projekty domków letniskowych męskie skarpetki rowerowe