[ https://issues.apache.org/jira/browse/PHOENIX-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14337789#comment-14337789 ]
James Taylor commented on PHOENIX-1115: --------------------------------------- I like the approach, [~rajeshbabu]. Here's some feedback: - To simplify things, I'd probably just support a TRACE (ON | OFF) for now. We can always add something down the road that tells you if tracing is on or not. Then you won't have all that tri logic and can likely just use boolean instead of Boolean - After this, I think you can have a static constant RowProjector defined in TraceQueryPlan that always has a single TRACE_ID column. - In both the TRACE ON and TRACE OFF, it's probably convenient if you return the trace ID of the connection. - If tracing is already ON, you could just return the existing trace ID. If tracing is OFF when you call TRACE OFF, you can just return EMPTY_ITERATOR. - Instead of setting the trace scope in ExecutableTraceStatement, set it in the call to next() of the ResultIterator anonymous class in TraceQueryPlan, as that's when the trace statement is "executed". - Not sure I understand why you've changed ExecutableUpdateStatisticsStatement with an override for trace(Boolean). Is that necessary? - Perhaps in a follow up JIRA, you can enhance the syntax to allow the sampling rate to be set? > 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 > Reporter: James Taylor > Assignee: Rajeshbabu Chintaguntla > Fix For: 5.0.0 > > Attachments: PHOENIX-1115.patch, PHOENIX-1115_v2.patch, > PHOENIX-1115_v3.patch, Screen Shot 2014-11-21 at 3.41.41 PM.png, > tracing_in_different_rdbms.pdf > > > 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)