Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added average time for each bin (in miliseconds).

  • Loading branch information...
commit 7ead5cd90c5bcd9ffb1aaef923b803eb5cdb571c 1 parent 862f989
@tvondra authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  query_histogram--1.0.sql
View
2  query_histogram--1.0.sql
@@ -14,4 +14,4 @@ CREATE OR REPLACE FUNCTION query_histogram_get_reset()
AS 'MODULE_PATHNAME', 'query_histogram_get_reset'
LANGUAGE C IMMUTABLE;
-CREATE OR REPLACE VIEW query_histogram AS SELECT * FROM query_histogram(true);
+CREATE OR REPLACE VIEW query_histogram AS SELECT histogram.*, round(1000000*bin_time/(CASE WHEN bin_count > 0 THEN bin_count ELSE 1 END))/1000 AS bin_time_avg FROM query_histogram(true) histogram;
Please sign in to comment.
Something went wrong with that request. Please try again.