From 629605c84e0c904ff84b787f40afd920abb428f1 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Sun, 8 Aug 2010 23:29:06 +0000 Subject: [PATCH] use materialised view in soap query --- cgi-bin/show_status_soap.pl | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) 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 -- 2.30.2