[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH] Create a partial index to speed the city name l
From: |
David Decotigny |
Subject: |
[Maposmatic-dev] [PATCH] Create a partial index to speed the city name lookups |
Date: |
Tue, 13 Oct 2009 09:34:07 +0200 |
Create a partial index to speed the city name lookups.
---
ocitysmap-init.sql | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ocitysmap-init.sql b/ocitysmap-init.sql
index 34ccc1c..2ff831c 100644
--- a/ocitysmap-init.sql
+++ b/ocitysmap-init.sql
@@ -19,7 +19,11 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
+-- Create a partial index to speed up the city name lookups (a few
+-- milliseconds versus a few minutes):
+create index admin_city_names
+ on planet_osm_line (boundary,admin_level,name)
+ where (boundary='administrative' and admin_level='8');
-- Create a view that associates each city with an area representing
-- its territory, based on the administrative boundaries available in
--
1.6.4.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Maposmatic-dev] [PATCH] Create a partial index to speed the city name lookups,
David Decotigny <=