Re: Query not in code, but has vaguely known WHERE condition

From: Mladen Gogala <mgogala_at_yahoo.com>
Date: Mon, 26 Jan 2015 13:06:46 +0000
Message-ID: <1493306529.515026.1422277605881.JavaMail.yahoo_at_mail.yahoo.com>



This looks like some kind of silly existence-checking query, probably generated by an application. It doesn't look like the work of Hibernate. -- Mladen Gogala
Oracle DBA
http://mgogala.freehostia.com

     On Monday, January 26, 2015 7:55 AM, Martin Klier <martin.klier_at_performing-db.com> wrote:    

 Hi listers,
I found a strange SQL in our database, causing Library Cache and Cursor Sharing fun of all kinds, but no need to elaborate on that. The database is a jungle of dynamic SQL and parsing storms, so we had to enable CURSOR_SHARING=SIMILAR to work at all. No value in ranting on that. What I need to do is, to find where it comes from, to start investigating the case.  The SQL text is like that:
SELECT :"SYS_B_0"
FROM DUAL
WHERE a.div_id = b.div_id

 AND a.entity_id = b.entity_id 
 AND a.attribute_id = :"SYS_B_1" 
 AND a.other_id = :"SYS_B_2"

We can see it being a top consumer or waiter in currently running / active sessions and ASH, but it never shows up in AWR. For sure, that's not one of ours, even when ignoring the fact that it does not make much sense for itself. All I recognise is the WHERE condition - it may match some of our MERGE ON clauses. So my questions:
1) How does the DB come to creating this kind of SQL text? 2) What's the use of it, the mechanism behind?3) How can I find out where it is triggered? Thank you all in advance!--
Freundliche Grüße / Best regards
Martin KlierPerforming Databases GmbHOracle ACE    
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 26 2015 - 14:06:46 CET

Original text of this message