From 73a4dd56109c4799fd1d4ac7ed56ff72a47279bb Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 1 Aug 2008 05:37:15 +0000 Subject: Bug 440188: buglist.cgi should display EXPLAIN output when &debug=1 Patch By Max Kanat-Alexander r=LpSolit, a=mkanat --- Bugzilla/DB/Pg.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Bugzilla/DB/Pg.pm') 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 ##################################################################### -- cgit v1.2.3-24-g4f1b