Subject Re: [firebird-support] What is this query?
Author Helen Borrie
At 03:54 AM 23/04/2008, Jeff Jones wrote:
>I have been running an application that uses Firebird 1.5 on the back
>end with the UIBMonitor utility to look at all the SQL statements run
>against the database. A query that I do not recognize has started
>popping up very frequently that looks like this:
>
>Select F.RDB$COMPUTED_BLR, F.RDB$DEFAULT_VALUE from
>RDB$RELATION_FIELDS R, RDB$FIELDS F where R.RDB$RELATION_NAME =
>'PS_P_GET_EMP_EFF_DT' and R.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME and
>R.RDB$FIELD_NAME = 'RESULT'
>
>I know that this is querying the system tables for information about a
>stored procedure named PS_P_GET_EMP_EFF_DT, and one of the output
>parameters named RESULT,

Hmmm, well, not exactly. This query will always return an empty set for a stored procedure.

>but I don't understand why this query would be needed.

It's possibly some kind of test the monitor component does to determine whether it is looking at a set drawn from a selectable procedure (nothing returned), or a view (will return a value in F.RDB$COMPUTED_BLR) or a table (will return NULL in F.RDB$COMPUTED_BLR).

>I did not include it in any of my procedures, but it may be coming from a component in the Delphi front end.

Yes.

>In any case, does anyone recognize this kind of query?

It's typical of the kind of query that a utility component might be asked to do.

> What does it do? Why would it appear in the monitor now? And, most importantly, how can I get it to stop?

If you want to retain the monitor, you'll need to ask the author of the component those questions.

./heLen