aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-08-10 17:22:20 +0100
committerMatthew Somerville <matthew@mysociety.org>2015-08-10 18:25:47 +0100
commit6329d2b848c405e4e646a4111941e82fcb0f33cb (patch)
treef7d270898bd6fab6d896ed5a5cfc8c7dd5e1ce7d /perllib/FixMyStreet/DB
parent6b84622fb7d58531baa7943abdcc7620999c34ee (diff)
Improve stored procedure performance.
Add an index on the radian values, make the function stable, and switch to a full bounding box rather than a slower angle check.
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Nearby.pm12
1 files changed, 0 insertions, 12 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
index a0ccb8a6d..670673ab3 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
@@ -36,16 +36,4 @@ sub nearby {
return \@problems;
}
-# XXX Not currently used, so not migrating at present.
-#sub fixed_nearby {
-# my ($dist, $mid_lat, $mid_lon) = @_;
-# mySociety::Locale::in_gb_locale { select_all(
-# "select id, title, latitude, longitude, distance
-# from problem_find_nearby(?, ?, $dist) as nearby, problem
-# where nearby.problem_id = problem.id and state='fixed'
-# site_restriction
-# order by lastupdate desc", $mid_lat, $mid_lon);
-# }
-#}
-
1;