You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Dave Harvey <dh...@jobcase.com> on 2018/07/12 13:07:36 UTC

Tracing all SQL Queries

Is there a simple way inside Ignite to get a log of all SQL Queries against
the cluster, either in the debug logs or elsewhere ?    This is not a easy
question to phase in a way that Google will find a useful answer.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Tracing all SQL Queries

Posted by Вячеслав Коптилин <sl...@gmail.com>.
Hi,

Yes, it can be specified in your Spring configuration file as follows:

<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
    <property name="longQueryWarningTimeout" value="500"/>
    ...
</bean>

Thanks,
Slava.


пн, 16 июл. 2018 г. в 19:39, ApacheUser <bh...@gmail.com>:

> Hi Slava,
> Sorry to get into this thread,I have similar problem to control long
> running
> SQLs. I want timeout SQLs running more than 500ms.
> I sthere any way to set etLongQueryWarningTimeout()  in CONFIG File?
>
> Appreciate your response.
>
> Thanks
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Tracing all SQL Queries

Posted by ApacheUser <bh...@gmail.com>.
Hi Slava,
Sorry to get into this thread,I have similar problem to control long running
SQLs. I want timeout SQLs running more than 500ms.
I sthere any way to set etLongQueryWarningTimeout()  in CONFIG File?

Appreciate your response.

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Tracing all SQL Queries

Posted by Вячеслав Коптилин <sl...@gmail.com>.
Hello Dave,

I am afraid that there is no such possibility out of the box.
The simple workaround that I can imagine is using
IgniteConfiguration#setLongQueryWarningTimeout() method and set 1ms for
example.
In that case, every SQL request that spends more than 1ms will be printed
in the log as follows:
[2018-01-04 06:32:38,230][WARN ] [IgniteH2Indexing] Query execution is too
long [time=3518 ms, sql='the execution plan of your SQL query will be
printed here"

I think you can modify the code of IgniteH2Indexing#executeSqlQueryWithTimer
for debugging purposes, and print out an execution plan always.

Thanks,
S.


чт, 12 июл. 2018 г. в 16:07, Dave Harvey <dh...@jobcase.com>:

> Is there a simple way inside Ignite to get a log of all SQL Queries against
> the cluster, either in the debug logs or elsewhere ?    This is not a easy
> question to phase in a way that Google will find a useful answer.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>