lib/pghero/methods/query_stats.rb in pghero-3.3.4 vs lib/pghero/methods/query_stats.rb in pghero-3.4.0
- old
+ new
@@ -317,10 +317,10 @@
end
query_stats
end
def explainable?(query)
- query =~ /select/i && !query.include?("?)") && !query.include?("= ?") && !query.include?("$1") && query !~ /limit \?/i
+ query =~ /select/i && (server_version_num >= 160000 || (!query.include?("?)") && !query.include?("= ?") && !query.include?("$1") && query !~ /limit \?/i))
end
# removes comments
# combines ?, ?, ? => ?
def normalize_query(query)