Ok Karl,
I think I had originally assumed that query text itself was *not* saved in
the QSF... but after glancing over the qsf code and seeing a number of
references to "stored query text objects" I started to get my hopes up!
Thanks for clarifying that!
How about this then: a dbms trace point that works like sc906, but logs ALL
query text along with the start / stop time (a server-wide printqry). If you
could specify a user_id as filter that would really be cool!
I'm not asking you to do it, just thinking out loud ;-). I'm sure if it
were easy to do, someone would have implemented it by now.
Regards,
Jim
----- Original Message -----
From: "Karl & Betty Schendel" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, January 24, 2007 4:08 PM
Subject: Re: [Users] Retrieving stored query text
>Hi all,
Is there any chance that there exists a way to retrieve the stored query
text of a named qsf query object (repeated or defined query)?Perhaps in an
undocumented trace point or very well hidden ima mib object?
No, because there is no stored query text.
A repeated query stores the compiled plan (the QP), and throws away
the stored text and the parse tree. If something changes such that
the QP fails validation at execution time, the server reports
a failure back to the application, which is required to re-send
and re-define the repeated query. (If you look at the code that
the embedded preprocessors generate for a repeated query, you'll
see the loop that tries to execute the query, and defines it if
the execute fails.)
There is some degree of assumption within QSF that any named object
(ie anything other than a non-repeated query in flight) is a QP
and not anything else. I don't remember how strongly wired in
that is, which would affect the difficulty of keeping the query
text for a repeated query. There's also the matter of using more
QSF memory, so you'd probably want a config parameter or something
to turn query text saving on and off. And of course you'd need
an IMA data point to return the qtext, probably for ima-trusted
users only. I'd say all of this is possible but nontrivial,
certainly it's not a one-hour change.
Karl
_______________________________________________
Users mailing list
[email protected]
http://lists.ingres.com/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.ingres.com/mailman/listinfo/users