I have a PostGIS db from OpenStreetMap (osm2pgsql) with my custom table. There are two problems with it:

  1. When I list tables, the columns from my table are scanned for geometry type, and it takes several minutes. OSM tables are read instantly. I don't see anything special in those tables with pg_dump. How do I set the metadata to avoid this scanning?

  2. (solved) QGIS tries to load all the points from that table, and there are 15M of them. Filter settings are available only after the layer is created. How can I filter points before reading them?~~

edit question 2 is solved: after tables are scanned, Set Filter button works fine.

1 Answer 1


You want to have correct entries in the geometry_columns table to avoid QGIS having to scan the table to determine the geometry type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.