Ticket #3453 (closed enhancement: worksforme)
Enable "Use estimated table metadata" by default
| Reported by: | arencambre | Owned by: | nobody |
|---|---|---|---|
| Priority: | major: does not work as expected | Milestone: | Version 1.7.0 |
| Component: | Data Provider | Version: | 1.6.0 |
| Keywords: | Cc: | aren@… | |
| Platform Version: | 7 | Platform: | Windows |
| Must Fix for Release: | No | Awaiting user input: | no |
Description
Postgis layer loads start out with this query:
select distinct case when geometrytype("the_geom") IN ('POINT','MULTIPOINT') THEN 'POINT' when geometrytype("the_geom") IN ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING' when geometrytype("the_geom") IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON' end from [databaseGoesHere]
I think this is needlessly expensive for my 12,000,000 row Postgis dataset for two reasons:
- DISTINCT isn't necessary because my dataset has no duplicates even though some rows may have identical locations. Do GIS datasets routinely have duplicate data? At least let me override DISTINCT before loading large datasets. I am now worried that other datasets may have had objects missed that had identical locations.
- Not sure why each geometry object is being checked for geometry type. QGIS knows the geometry type before the Postgis layer is even loaded thanks to the geometry_columns table.
Change History
Note: See
TracTickets for help on using
tickets.