From: Michael Andreen Date: Wed, 28 Jan 2009 19:31:11 +0000 (+0100) Subject: No need to have index on target modfication date X-Git-Url: https://ruin.nu/git/?p=ndwebbie.git;a=commitdiff_plain;h=dfbede13bdc76b43f8a4463bd8e912306f440b4d No need to have index on target modfication date --- diff --git a/lib/NDWeb/Controller/JSRPC.pm b/lib/NDWeb/Controller/JSRPC.pm index 3bea69a..aade3c7 100644 --- a/lib/NDWeb/Controller/JSRPC.pm +++ b/lib/NDWeb/Controller/JSRPC.pm @@ -38,7 +38,8 @@ sub update : Local { my $targets;; if ($from){ - my ($timestamp) = $dbh->selectrow_array("SELECT MAX(modified)::timestamp AS modified FROM raid_targets"); + my ($timestamp) = $dbh->selectrow_array(q{SELECT MAX(modified)::timestamp AS modified + FROM raid_targets WHERE raid = $1},undef,$raid->{id}); $c->stash(timestamp => $timestamp); $targets = $dbh->prepare(q{SELECT r.id,r.planet FROM raid_targets r WHERE r.raid = ? AND modified > ?