From: Andrew Dunstan Date: Sun, 8 Aug 2010 23:29:06 +0000 (+0000) Subject: use materialised view in soap query X-Git-Url: https://git.exim.org/buildfarm-server.git/commitdiff_plain/629605c84e0c904ff84b787f40afd920abb428f1 use materialised view in soap query --- diff --git a/cgi-bin/show_status_soap.pl b/cgi-bin/show_status_soap.pl index e51db59..5d12800 100755 --- a/cgi-bin/show_status_soap.pl +++ b/cgi-bin/show_status_soap.pl @@ -38,32 +38,8 @@ sub get_status my $statement =< now() - '30 days'::interval - ) m - where name = sysname - and s.status = 'approved' + select (now() at time zone 'GMT')::timestamp(0) - snapshot as when_ago, dsh.* + from dashboard_mat dsh order by branch = 'HEAD' desc, branch desc, snapshot desc