UI Sandbox - GED4GEM add index to Gem_exposure
Bug #941938 reported by
Ben Wyss
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenQuake (deprecated) |
Fix Released
|
Medium
|
Ben Wyss |
Bug Description
[et=6h]
[at= h]
The gem_exposure table is very large (144 mil rows) and need an primary key index and a spatial index to make it usable by the UI
description: | updated |
Changed in openquake: | |
status: | New → In Progress |
Changed in openquake: | |
milestone: | 0.6.0 → 0.6.1 |
description: | updated |
Changed in openquake: | |
importance: | Medium → Low |
importance: | Low → Medium |
status: | In Progress → Confirmed |
Changed in openquake: | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
After applying a GIST index:
CREATE INDEX gem_exposure_gix on eqged.gem_exposure using gist (grid_point_ the_gem) ;
The good news: the points now render in OpenLayers from 1:17,000 (rendering about 10 points) to 1:68,000 (rendering about 125 points, which is my opinion is pushing the limit of usability) scale
The bad news: performance is still unacceptable in a 2GB RAM environment, and it is very slow.
More good news, once a view has been cached in GeoServer they are re-accessible at reasonable speeds.
Also the get feature information tool works surprisingly well considering that it is accessing and displaying one row out of 144 million. The first info query takes about 7 seconds, and then others in the area take around 4ms.
In short: the GIST index (took one night to create) dramatically increased the performance. The UI is slow when one first zooms to an area, but once the features are cached the tools becomes quite usable. The first query of a feature is slow, but after that other queriers in the area are much much faster.
I would suggest to set up the get feature information tool to hook it's search results to the southern grid instead of a pop-up.
I would also suggest to set the zoom limit on the layer.