SQL Performance (MOSC)

MOSC Banner

Query that executes normally consumes too much CPU when used inside a procedure

edited Apr 5, 2018 5:00AM in SQL Performance (MOSC) 5 commentsAnswered

Greetings,

I have a database in a server with Oracle 11g Standard Edition, where I have a query that shows about 7K rows in about 13 seconds.

This query executes normally, but when put into a procedure, it behaves differently, consuming about 100% of CPU and not ending for more than 20 minutes. I haven't been able to see it to the end because the process has to be killed in order to free resources in the server.

This is the query:

Header 1

SELECT

CASE

      WHEN  I.IN_CREATION_USER= to_char(I.IN_PROVIDER_RUC_CK) THEN 'E'

WHEN  I.IN_CREATION_USER= to_char(I.IN_ACQ_RUC) THEN 'A'

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