Let's assume there is a C++ application executing a specific SQL query on Oracle database.
This query was working fine for last couple of years in production at a customer's environment, but suddenly one fine day the query started taking around 10x more time to execute. (Assume there is constant addition of data in the tables on which this query works ).
While doing the analysis the experts found that Oracle's optimizer is not generating an optimal plan because of may reasons related to DB statistics/data skew/all the other parameters which can influence optimizer to generate sub optimal plan.
Forcing the optimizer by placing hints in the query to generate a good execution plan works perfectly.
Application development team is now being pressurised to change the application code and inject the hint in the query when it's being constructed.
Application development team doesn't want to change application code because they have hundreds of other customers who are not complaining about this specific query performance. Changing application code also means more maintenance cost as they will need mechanism in place to disable the hint it the hint is no longer needed when customer upgrades database to newer release.
The customer in question is not willing to hire a DBA who can execute SQL command to tune the query using plan baseline feature.
What are the options for application development team in this case?