summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Pg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/DB/Pg.pm')
-rw-r--r--Bugzilla/DB/Pg.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index a6a2e3281..d06decaa3 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -171,6 +171,12 @@ sub bz_sequence_exists {
return $exists || 0;
}
+sub bz_explain {
+ my ($self, $sql) = @_;
+ my $explain = $self->selectcol_arrayref("EXPLAIN ANALYZE $sql");
+ return join("\n", @$explain);
+}
+
#####################################################################
# Custom Database Setup
#####################################################################