You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Samarth Jain (JIRA)" <ji...@apache.org> on 2015/02/05 01:15:34 UTC

[jira] [Commented] (PHOENIX-1115) Provide a SQL command to turn tracing on/off

    [ https://issues.apache.org/jira/browse/PHOENIX-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14306277#comment-14306277 ] 

Samarth Jain commented on PHOENIX-1115:
---------------------------------------

Thanks for the patch [~rajeshbabu]. I took a look at it and here is my initial feedback:
1) You can likely avoid creating new TraceScope and creating Span in executeQuery() and executeUpdate(). On seeing sql trace on, you can set the sampler to ALWAYS. Similarly, when tracing is turned off by issuing SET sql_trace=false, you can set the sampler to NEVER. By doing this, I believe you can just rely on the existing code that is managing tracing without you having to create your own TraceScope and Span. 
2) In PhoenixStatement#printTraceInformation should the output always go to standard output? Also should you always be printing the trace information? Do you know what Oracle/Postgres do with tracing turned on? I would think of SET sql_trace=true/false only as a way of dynamically turning tracing on and off for a PhoenixConnection.
3) We allow people to specify their own trace table name. So your queries that are querying the trace table should be against 
{code}
String tableName = conf.get(QueryServices.TRACING_STATS_TABLE_NAME_ATTRIB,
                                QueryServicesOptions.DEFAULT_TRACING_STATS_TABLE_NAME);
{code}  

> Provide a SQL command to turn tracing on/off
> --------------------------------------------
>
>                 Key: PHOENIX-1115
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1115
>             Project: Phoenix
>          Issue Type: Sub-task
>    Affects Versions: 5.0.0, 4.1
>            Reporter: James Taylor
>            Assignee: Rajeshbabu Chintaguntla
>         Attachments: PHOENIX-1115.patch, Screen Shot 2014-11-21 at 3.41.41 PM.png
>
>
> Provide a SQL command that turns tracing on and off. For example, Oracle has this:
> {code}
> ALTER SESSION SET sql_trace = true;
> ALTER SESSION SET sql_trace = false;
> {code}
> We might consider allowing the sampling rate to be set as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)