phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Young <yomaiq...@gmail.com>
Subject Re: Phoenix Query Server query logging
Date Tue, 28 Feb 2017 01:49:30 GMT
I hadn't seen a reply to my earlier question.

We have business analysts running queries using BI tools (like Tableau)
which connect via the Phoenix Query Server.

How can we log all SELECT queries (raw query, start time, end time, etc...)?

Any way to tweak log4j or other properties to get this?  The TRACE logging
I tried (mentioned in my post above) was way too dense to be useful for
reporting usage, and doesn't seem to show the full SQL query params and
query start/end times.  Also, it logs every UPSERT during data load (which
overwhelms the log files).  We really just need SELECTS logged.



On Tue, Jan 31, 2017 at 5:10 PM, Michael Young <yomaiquin@gmail.com> wrote:

> Does the Phoenix Query Server have an option to log the SQL statements
> which are executed?
>
> We see there are ways to get various PQS trace logs modifying the log4j
> settings used by the queryserver.py:
>
> log4j.org.apache.phoenix.jdbc.PhoenixStatementFactory=TRACE (or DEBUG)
> log4j.org.apache.phoenix.jdbc.PhoenixStatement=TRACE
> log4j.logger.org.apache.calcite.avatica=TRACE
> log4j.logger.org.apache.phoenix.queryserver.server=TRACE
> etc...
>
> but the data in the trace logs (which show SQL statements) are not
> particularly user friendly.  And it does not seem straightforward to get to
> end-to-end query execution times.
>
> Any suggestions how to get simple SQL logs (raw query, execution time,
> ...)?  The idea is to monitor user activity and take action if query times
> are slow, or timeout.
>
> Thanks,
> Michael
>

Mime
View raw message