What can make a simple query that normally runs in split seconds using the primary key turn into a 19 minute full scan? Well, many things, but in this case non of the usual suspects. The primary key was usable and rebuilding it made no difference. We updated the already recent statistics to no avail. There was no SQL Profile defined and the query did not use hints. It turned out that at some point the parameter OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES had been set and as a result Oracle had happily collected baselines in order to prevent performance regressions, as the sales message goes. Deleting the baseline fixed the problem and the optimizer immediately switched to an index range scan on the primary key.
SQL baselines may serve a purpose, but if you don’t trust the optimizer to do the right thing, why would you trust it to collect baselines automatically in order to guide itself in the future? Beware of OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES and either create the baselines under controlled circumstances or let the optimizer do its job and correct it with profiles where necessary!
Recently I had to fix a bug in an old C++ application developed with Visual Studio 2010. My computer is newer, so it has .NET 4.5 installed. Guess what? Without any changes the code failed to build with:
LINK: fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
The problem should be fixed in SP1, but getting that installed was non-trivial without admin rights. Fortunately the issue can be traced to a single file:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe. The wrong version is 31,048 bytes, the correct version (from SP1) is 31,056 bytes. The wrong version has a dependency to msvcr100_clr0400.dll whereas the correct version depends on msvcr100.dll. Replace the file (for exampel from another installation with SP1 installed) and the problem is solved! Much faster than patching, not to mention trying to revert from .NET 4.5 to an older version.
This is one of the best posts I’ve seen in a long time about Oracle Fusion Middleware (SOA Suite) and the Oracle 12c database. It shows how to use Chef and Puppet and Docker to build a container running Oracle Fusion Middleware 12 with Oracle 12c. Excellent and truly useful!