summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Pg.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-08-01 07:37:15 +0200
committermkanat%bugzilla.org <>2008-08-01 07:37:15 +0200
commit73a4dd56109c4799fd1d4ac7ed56ff72a47279bb (patch)
tree1b029a07667f48b1eb80507b815905ef9bb217f3 /Bugzilla/DB/Pg.pm
parentd165b7785df760352ce17d3677691c5be0b3b6c4 (diff)
downloadbugzilla-73a4dd56109c4799fd1d4ac7ed56ff72a47279bb.tar.gz
bugzilla-73a4dd56109c4799fd1d4ac7ed56ff72a47279bb.tar.xz
Bug 440188: buglist.cgi should display EXPLAIN output when &debug=1
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
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
#####################################################################