add make psql-analyze and make psql-vacuum-analyze

This commit is contained in:
ImreSamu 2017-01-20 23:30:02 +01:00
parent 23c276f4dd
commit 61af8e9517
2 changed files with 15 additions and 1 deletions

View File

@ -18,6 +18,8 @@ help:
@echo " make download-geofabrik area=albania # download OSM data from geofabrik, and create config file" @echo " make download-geofabrik area=albania # download OSM data from geofabrik, and create config file"
@echo " make psql # start PostgreSQL console " @echo " make psql # start PostgreSQL console "
@echo " make psql-list-tables # list all PostgreSQL tables " @echo " make psql-list-tables # list all PostgreSQL tables "
@echo " make psql-vacuum-analyze # PostgreSQL: VACUUM ANALYZE"
@echo " make psql-analyze # PostgreSQL: ANALYZE"
@echo " make generate-qareports # generate reports [./build/qareports]" @echo " make generate-qareports # generate reports [./build/qareports]"
@echo " make generate-devdoc # generate devdoc [./build/devdoc]" @echo " make generate-devdoc # generate devdoc [./build/devdoc]"
@echo " make import-sql-dev # start import-sql /bin/bash terminal " @echo " make import-sql-dev # start import-sql /bin/bash terminal "
@ -31,7 +33,6 @@ help:
@echo " make pgclimb-list-tables # list PostgreSQL public schema tabless" @echo " make pgclimb-list-tables # list PostgreSQL public schema tabless"
@echo " cat .env # list PG database and MIN_ZOOM and MAX_ZOOM informations" @echo " cat .env # list PG database and MIN_ZOOM and MAX_ZOOM informations"
@echo " cat ./quickstart.log # backup of the last ./quickstart.sh " @echo " cat ./quickstart.log # backup of the last ./quickstart.sh "
@echo " ....TODO.... # start lukasmartinelli/postgis-editor"
@echo " make help # help about avaialable commands" @echo " make help # help about avaialable commands"
@echo "==============================================================================" @echo "=============================================================================="
@ -91,6 +92,14 @@ pgclimb-list-views:
pgclimb-list-tables: pgclimb-list-tables:
docker-compose run --rm import-osm /usr/src/app/pgclimb.sh -c "select schemaname,tablename from pg_tables where schemaname='public' order by tablename;" csv docker-compose run --rm import-osm /usr/src/app/pgclimb.sh -c "select schemaname,tablename from pg_tables where schemaname='public' order by tablename;" csv
psql-vacuum-analyze:
@echo "Start - postgresql: VACUUM ANALYZE VERBOSE;"
docker-compose run --rm import-osm /usr/src/app/psql.sh -P pager=off -c 'VACUUM ANALYZE VERBOSE;'
psql-analyze:
@echo "Start - postgresql: ANALYZE VERBOSE ;"
docker-compose run --rm import-osm /usr/src/app/psql.sh -P pager=off -c 'ANALYZE VERBOSE;'
import-sql-dev: import-sql-dev:
docker-compose run --rm import-sql /bin/bash docker-compose run --rm import-sql /bin/bash

View File

@ -237,6 +237,11 @@ echo "====> : Start SQL postprocessing: ./build/tileset.sql -> PostgreSQL "
echo " : Source code: https://github.com/openmaptiles/import-sql " echo " : Source code: https://github.com/openmaptiles/import-sql "
docker-compose run --rm import-sql docker-compose run --rm import-sql
echo " "
echo "-------------------------------------------------------------------------------------"
echo "====> : Analyze PostgreSQL tables"
make psql-analyze
echo " " echo " "
echo "-------------------------------------------------------------------------------------" echo "-------------------------------------------------------------------------------------"
echo "====> : Start generating MBTiles (containing gzipped MVT PBF) from a TM2Source project. " echo "====> : Start generating MBTiles (containing gzipped MVT PBF) from a TM2Source project. "