You may have seen cases in which the query optimizer chose
an incorrect execution path that resulted in poor performance. You may feel that you
have a better understanding of the structure and use of the database than the query
optimizer. For these reasons, youmight look to hints to force the acceptance of the execution
path you feel is correct.
We recommend using the query optimizer for all of your queries rather than using
hints. Although the Oracle developers who wrote the query optimizer had no knowledge
of your particular database, they did depend on a lot of customer feedback,
experience, and knowledge of how Oracle processes queries during the creation of the
query optimizer. They designed the cost-based optimizer to efficiently execute all types
of queries that may be submitted to the Oracle database.
In addition, there are three advantages that the query optimizer has over your discretion
in all cases:
??? The optimizer sees the structure of the entire database. Many Oracle databases
support a variety of applications and users and it??™s quite possible that your
system shares data with other systems, making the overall structure and composition
of the data somewhat out of your control.
Pages:
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271