query plan from session cache
Posted in 2007
Topics: Performance & Tuning
Hi, is it possible to retrieve the query plan(s) for an already running SQL (or for SQLs from the session cache)? The problem: When I run the 'slow' SQL (with set explain) it runs fast and well optimized - but the application runs the same SQL much slower. Regards, Andreas Kutsche ------------------------------------------- SPAR Osterreichische Warenhandels-AG Hauptzentrale A - 5015 Salzburg, Europastrasse 3 FN 34170 a Tel: +43 662 4470 24223 Mobile: +43 664 6259575 E-Mail: Andreas.KUTSCHE@spar.at Internet: http://www.spar.at Wichtiger Hinweis: Der Inhalt dieser E-Mail kann vertrauliche und rechtlich geschutzte Informationen, insbesondere Betriebs- oder Geschaftsgeheimnisse, enthalten, zu deren Geheimhaltung der Empfanger verpflichtet ist. Die Informationen in dieser E-Mail sind ausschlie?lich fur den Adressaten bestimmt. Sollten Sie die E-Mail irrtumlich erhalten haben so ersuchen wir Sie, die Nachricht von Ihrem System zu loschen und sich mit uns in Verbindung zu setzen. Uber das Internet versandte E-Mails konnen leicht manipuliert oder unter fremdem Namen erstellt werden. Daher schlie?en wir die rechtliche Verbindlichkeit der in dieser Nachricht enthaltenen Informationen aus. Der Inhalt der E-Mail ist nur rechtsverbindlich, wenn er von uns schriftlich bestatigt und gezeichnet wird. Sollte trotz der von uns verwendeten Virus-Schutzprogramme durch die Zusendung von E-Mails ein Virus in Ihre Systeme gelangen, haften wir nicht fur evtl. hieraus entstehende Schaden. Wir danken fur Ihr Verstandnis. Important notice: The contents of this e-mail may contain confidential and legally protected information that is in particular related to operational and trade secrets, which the recipient is obliged to treat as confidential. The information in this e-mail is made available exclusively for use by the addressee. In the event that the e-mail may have been sent to you in error, we would ask you to kindly delete this communication from your system and to contact us. E-mails sent via the Internet can be easily manipulated or sent out under someone else's name. We therefore do not accept legal liability for the information contained in this communication. The contents of the e-mail are only legally binding if they have been confirmed and signed by us in writing. If, in spite of our using Antivirus protection software, a virus may have penetrated your system through the sending of this e-mail, we do not accept liability for any damage that may possibly arise as a result of this. We trust that you appreciate our position. -------------------------------------------
onstat -u to find out what running sqls and the session number.
onstat -g ses {number} to get the current and possibly previous SQL.
Assuming IDS 10 you can turn explain on with onmode -Y {session} 1
You can also get this information from sysmaster.
MW
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Andreas.KUTSCHE@spar.at
Sent: Friday, 12 October 2007 11:44 p.m.
To: ids@iiug.org
Subject: query plan from session cache [10128]
Hi,
is it possible to retrieve the query plan(s) for an already running SQL
(or for SQLs from the session cache)?
The problem: When I run the 'slow' SQL (with set explain) it runs fast
and well optimized - but the application
runs the same SQL much slower.
Regards,
Andreas Kutsche
-------------------------------------------
SPAR Osterreichische Warenhandels-AG
Hauptzentrale
A - 5015 Salzburg, Europastrasse 3
FN 34170 a
Tel: +43 662 4470 24223
Mobile: +43 664 6259575
E-Mail: Andreas.KUTSCHE@spar.at
Internet: http://www.spar.at
Wichtiger Hinweis: Der Inhalt dieser E-Mail kann vertrauliche und
rechtlich
geschutzte Informationen, insbesondere Betriebs- oder
Geschaftsgeheimnisse,
enthalten, zu deren Geheimhaltung der Empfanger verpflichtet ist. Die
Informationen in dieser E-Mail sind ausschlie?lich fur den Adressaten
bestimmt. Sollten Sie die E-Mail irrtumlich erhalten haben so ersuchen
wir
Sie, die Nachricht von Ihrem System zu loschen und sich mit uns in
Verbindung
zu setzen.
Uber das Internet versandte E-Mails konnen leicht manipuliert oder unter
fremdem Namen erstellt werden. Daher schlie?en wir die rechtliche
Verbindlichkeit der in dieser Nachricht enthaltenen Informationen aus.
Der
Inhalt der E-Mail ist nur rechtsverbindlich, wenn er von uns schriftlich
bestatigt und gezeichnet wird.
Sollte trotz der von uns verwendeten Virus-Schutzprogramme durch die
Zusendung
von E-Mails ein Virus in Ihre Systeme gelangen, haften wir nicht fur
evtl.
hieraus entstehende Schaden.
Wir danken fur Ihr Verstandnis.
Important notice: The contents of this e-mail may contain confidential
and
legally protected information that is in particular related to
operational and
trade secrets, which the recipient is obliged to treat as confidential.
The
information in this e-mail is made available exclusively for use by the
addressee. In the event that the e-mail may have been sent to you in
error, we
would ask you to kindly delete this communication from your system and
to
contact us.
E-mails sent via the Internet can be easily manipulated or sent out
under
someone else's name. We therefore do not accept legal liability for the
information contained in this communication. The contents of the e-mail
are
only legally binding if they have been confirmed and signed by us in
writing.
If, in spite of our using Antivirus protection software, a virus may
have
penetrated your system through the sending of this e-mail, we do not
accept
liability for any damage that may possibly arise as a result of this.
We trust that you appreciate our position.
-------------------------------------------
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.