Skip to Main Content
  • Questions
  • The Hint OPT_ESTIMATE is 20 years old: can we use it now ?

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Maurice.

Asked: September 04, 2023 - 11:28 pm UTC

Last updated: September 14, 2023 - 1:16 pm UTC

Version: 19.18

Viewed 1000+ times

You Asked

Hi,

I discovered the powerful, not officially documented, hint OPT_ESTIMATE about 12 years ago.

Recently I discovered the following officiel document about it:
Oracle Support Document 2402821.1 (How To Use Optimizer Hints To Specify Cardinality For Join Operation)

My question: is it now a documented hint or should it still not be used in SQL code?

Regards
Maurice

and Chris said...

Any undocumented features of Oracle Database may change or be removed without warning. So use them at your own risk!

When it comes to OPT_ESTIMATE, personally I doubt this will change anytime soon.

That said, if you're trying to influence the plan of production queries, I'd recommend you use SQL plan management (baselines) and/or SQL profiles; not hints. These are fully documented & thus supported features of Oracle Database.

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

SQL

The Oracle documentation contains a complete SQL reference.