[ https://issues.apache.org/jira/browse/PHOENIX-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajeshbabu Chintaguntla updated PHOENIX-1115: --------------------------------------------- Attachment: PHOENIX-1115_v2.patch [~samarthjain] Thanks for review. Here is the patch addressing comments. bq. You can likely avoid creating new TraceScope and creating Span in executeQuery() and executeUpdate(). Avoided creating tracescope in executeQuery but cannot avoid in executeMutation otherwise difficult to get particular trace id of the query running. For mutation queries we commit all the updates together in mutationstate which is common for all statements in a connection. bq. 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 I think better to have the flag atleast we can print the information only when it's true. We can have one more attribute called sampling rate or tracelevel. We can have any kind of samplers not just ALWAYS or NEVER. bq. In PhoenixStatement#printTraceInformation should the output always go to standard output? Also should you always be printing the trace information? Currently printing the tracing information to standard output. We can raise improvement actions to write the trace information to files and so on. If sql_trace is true and sampling rate is ALWAYS then only printing the trace information. bq. Do you know what Oracle/Postgres do with tracing turned on? In oracle printing the trace information to files and had some tools to represent in tabular forms. bq. I would think of SET sql_trace=true/false only as a way of dynamically turning tracing on and off for a PhoenixConnection. Yes, it's in the connection level. bq. We allow people to specify their own trace table name. So your queries that are querying the trace table should be against In the latest patch using the configured table name otherwise default will be used. > 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, PHOENIX-1115_v2.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)