Query that executes normally consumes too much CPU when used inside a procedure
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' |