[
https://issues.apache.org/jira/browse/PHOENIX-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14726199#comment-14726199
]
ASF GitHub Bot commented on PHOENIX-2182:
-----------------------------------------
Github user codymarcel commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/115#discussion_r38472866
--- Diff:
phoenix-pherf/src/main/java/org/apache/phoenix/pherf/util/PhoenixUtil.java ---
@@ -274,4 +274,34 @@ public void updatePhoenixStats(String tableName,
Scenario scenario) throws Excep
logger.info("Updating stats for " + tableName);
executeStatement("UPDATE STATISTICS " + tableName, scenario);
}
+
+ /**
+ * Get explain plan for a query
+ *
+ * @param query
+ * @return
+ * @throws SQLException
+ */
+ public String getExplainPlan(Query query) throws SQLException {
+ Connection conn = null;
+ ResultSet rs = null;
+ PreparedStatement statement = null;
+ StringBuilder buf = new StringBuilder();
+ try {
--- End diff --
You might want to consider using the JdbcSession() to handle all the boiler
plate try/catch/finally stuff on the connection.
Check out testRWWorkload()
https://github.com/apache/phoenix/blob/master/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/DataIngestIT.java
> Pherf - Add ability to compare of run(s) and generate warning if performance
> degrades beyond set threshold
> ----------------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-2182
> URL: https://issues.apache.org/jira/browse/PHOENIX-2182
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Mujtaba Chohan
> Assignee: Mujtaba Chohan
> Attachments: PHOENIX-2182.patch
>
>
> Add ability to compare of run(s) and generate warning if performance degrades
> beyond set threshold. This would also need that runs can be labeled for known
> baselines.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)