I know this is a loaded question, but here it is :-)
We have an environment, which was I/O bound before we tuned it. We addresses some issues, and now, we made it cpu bound, as queries, which were performing horribly, are not very fast, but this did not scale to the number of concurrent users hitting the system.
What we did, was to collect stats at 25%, and then, as we identified the bad queries in the system, which is generated by the 3rd party app, and we can not tune, we changed the histograms on the PK for the main tables involved, so that the CBO would find the best path, and thus, give us better results.
One of the tables have 2.5 million rows, another 3.5, and there are a couple of columns, which are used on joins, where the distinct value, or cardinality is very low, so, we got that, and re-analized the index with that number in. The queries are now flying, but latch contention is also very high,and when user load hit the system, ( there is no way to test this in non-production mode ), it brought it to its knees, and we had to back out some of it.
Ironically, we had to introduce some table scans back, so that the CPUs would have enought time to wait.
Production is much better than it was, but we still see many queries that could benefit from individual tuning ( these queries are simply happening all the time, and are very similar ). We changed cursor sharing to SIMILAR, increased the shared pool a bit, pga also, so sorts would happen in memory, and now, need to understand how to tune these queries, without having cpu ( latch contention ).
we tried to remove the stats on the joined indexes, to see if RULE would be better, but still had the contention. We are continue to test by changing DB writers to 8, to try to reduce library cache contention and _DB_BLOCKS_HASH_LATCHES=40000 ( from 8192 ), however, this can not be done in prod, as we need an outage there, and we can not replicate the problem in staging :-(
I am attaching the init.ora for this instance.
DB server has 16 CPUs, 32 GB memory
"to be or not to be, what was the question ???? "