From 03256306171a507a28278f67575a680bd641591c Mon Sep 17 00:00:00 2001 From: Michael Wiencek Date: Thu, 8 Oct 2015 00:51:55 -0500 Subject: [PATCH] Remove unneeded ORDER BY This has no effect on the final output. The URLs are sorted before they're written. --- lib/MusicBrainz/Server/Sitemap/Overall.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/MusicBrainz/Server/Sitemap/Overall.pm b/lib/MusicBrainz/Server/Sitemap/Overall.pm index 3a1fa273160..0be40789a44 100644 --- a/lib/MusicBrainz/Server/Sitemap/Overall.pm +++ b/lib/MusicBrainz/Server/Sitemap/Overall.pm @@ -333,9 +333,7 @@ sub build_one_batch { } my $columns = join(', ', "$entity_id AS main_id", @{ $extra_sql{columns} }); my $tables = $entity_type . $extra_sql{join}; - my $query = "SELECT $columns FROM $tables " . - "WHERE ceil(${entity_type}.id / ?::float) = any(?) " . - "ORDER BY ${entity_type}.id ASC"; + my $query = "SELECT $columns FROM $tables WHERE ceil($entity_type.id / ?::float) = any(?)"; my $ids = $c->sql->select_list_of_hashes($query, $MAX_SITEMAP_SIZE, $batch_info->{batches}); for my $suffix (sort keys %{$entity_suffix_info}) {