SQL Performance (MOSC)

MOSC Banner

How is this possible?

edited Mar 8, 2019 11:14AM in SQL Performance (MOSC) 4 commentsAnswered ✓

Hello, I'm on Oracle Database 12.2, Linux, patches are current, statistics are current.

I have a Korn shell script that runs 3 queries, a select an insert and a delete. It’s been running for months in seconds. Suddenly it’s taking 12 minutes to run.

By process of elimination I narrowed down the offending query to the select.

In the shell script it’s taking 12 minutes. In SQL Plus on the database server it’s taking 12 minutes. In Toad it takes mircoseconds.

In OEM I discovered 2 different plan hash values and execution times. One very fast, one very not fast. I was able to recreate the 12 minute and microsecond run times at will by logging in with the different products.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center