Search Results for: SQL Profile

December 26 Plan Change

On December 26th, which is a holiday for my company this year, our team got a page that a plan had changed on an important 11.2.0.3 HP Unix platform Oracle database. The new plan was inefficient but did not cause … Continue reading

Posted in Uncategorized | 2 Comments

Plan Change Due to Index Partition Names Mismatch

I want to document a bug I ran across in Oracle 11.2.0.3 on HP-UX Itanium and how it caused unexpected plan changes that would bring the database to its knees with many long running queries running the bad plan. I … Continue reading

Posted in Uncategorized | Leave a comment

Query Plan Change Diagnosis Example

This week I investigated an issue with a query that was suddenly a lot slower in one test environment than another. It runs about 2 seconds in the good case as well as in production. But it was now running … Continue reading

Posted in Uncategorized | Leave a comment

Batch Query Reduced from 12 hours to 45 Minutes

I was asked to look at a batch SQL query that ran for 12 hours on June 4th. I messed around with some other ideas and then went back to my best method for tuning long running batch queries. I … Continue reading

Posted in Uncategorized | 6 Comments

Result cache latch contention

I recently saw a dramatic example of result cache latch contention. I had just upgraded a database to 11.2.0.4 and several hours later processing pretty much came to a halt. Of course I am telling you the end before I … Continue reading

Posted in Uncategorized | 3 Comments

Understanding query slowness after platform change

We are moving a production database from 10.2 Oracle on HP-UX 64 bit Itanium to 11.2 Oracle on Linux on 64 bit Intel x86. So, we are upgrading the database software from 10.2 to 11.2. We are also changing endianness … Continue reading

Posted in Uncategorized | Leave a comment

Different plan_hash_value same plan

I mentioned this same effect in an earlier post about SQL profiles: link I get a different plan_hash_value values for a query each time I run an explain plan or run the query.  I see this in queries whose plan … Continue reading

Posted in Uncategorized | 6 Comments

Script to compare plan performance

Here’s a zip of a script I modified today: zip Here’s an example output:  QUERY_NUM SQL_ID        PLAN_HASH_VALUE EXECUTIONS AVG_ELAPSED OPTIMIZER_COST AVG_FETCHES  AVG_SORTS AVG_DISK_READS AVG_BUFFER_GETS   AVG_ROWS    AVG_CPU AVG_IOWAIT AVG_DIRECT_WRITES AVG_PHYS_READS AVG_PHYS_WRITES ———- ————- ————— ———- ———– ————– ———– ———- ————– ————— … Continue reading

Posted in Uncategorized | Leave a comment

Oracle 21c Laptop Install

Finally got around to installing Oracle 21c on my laptop. I installed it on Oracle’s Linux version 7 running in VirtualBox. There are other posts out there, so I won’t get too detailed. I noticed this post: https://oracle-base.com/articles/21c/oracle-db-21c-installation-on-oracle-linux-7 But I … Continue reading

Posted in Uncategorized | Leave a comment

Finished reading the Snowflake database documentation

I just finished reading the Snowflake database documentation and I thought I would blog about my impressions. I have not spent a lot of time using Snowflake so I can not draw from experience with the product. But, I read all … Continue reading

Posted in Uncategorized | 23 Comments