Re: Find our query that takes long time
Posted in 2007
On 16 Sep., 07:28, mohitanch...@gmail.com wrote:
> Version: IDS 10
>
> I just have a small question: Does informix stores the query execution
> time, user who executed it etc. somewhere or something that gives some
> Warnings about queries that are really bad. I was thinking if there is
> any easy way to find out about query statistics without having to put
> set explain on and some kind of debugging around the queries. It would> help a lot where there are thousands of queries in a complex
> application.
>
> I am sure what I am asking for is not relevant for informix to store
> because onus lies on the application developer, still I thought I'll
> ask.
Hi,
have you heard about the SQLSTATS client environment variable?
SQLSTATS=1 -> will record frequency in
sysmaster:syssqexplain.sqx_executions
SQLSTATS=2 -> will record frequency and cumulated time for the
query in table mentioned above.
Works good for preprared statements.
Best regards
Stefan