-
-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of separate place_classtype_* tables #1652
Comments
its 47,000+ lines, I suggest as part of this job
I am looking at the wrong file. I guess we keep the postgress SQL as is, if I feel we need to do the above I can make a script to gen the sql from country specific input files |
Do you mean the file emitted by |
yes sorry. i am just feeling my way. are those phrases generated form somewhere else, I guess they must be, its a database worth. I am in the right file, but i wont do anything till i have touched base multiple times |
|
yes sorry, i realized that as soon as i said it, its the input/output to the program i am supposed to be fixing, this wont be the last stupid thing i say, please bear with me |
So the catch with this approach is actually the index creation itself. So far we would create a helper index over |
I've played with this in https://github.com/lonvia/Nominatim/tree/remove-special-classtype-tables-II. The most promising approach to replace the classtype tables is a unified index over the centroid column that includes the type in the index. Unfortunately we have gist indexes with included data only from Postgresql 12. So I'm putting this on the back burner for a year or so. |
The
place_classtype_*
tables are there so that places can be searched by their type, for examplerestaurants in Hickeroy
. They are extra tables because it is not possible to have a combined index of columns where one column is a geometry. So we copy out the place_id and geometry of places of a certain class/type into a separate table and create an index over the geometry there.We should replace this mechanism with simple partial indexes. Todo:
utils/specialphrases.php
. For each class/type create and index of the formCREATE INDEX class_type_??? ON placex USING gist(centroid) WHERE class = ?? and type = ??
.place_classtype_*
and replace those with a query onplacex
. (Check for the existence of a index class_type_?? to find out if the combination of class and type is supported.)place_classtype_*
The text was updated successfully, but these errors were encountered: