This project has moved. For the latest updates, please go here.

Store tables in RAM

Topics: Data Access, SharpMap v0.9 / v1.x, Web Controls
Aug 10, 2011 at 1:59 PM

Is it possible to store PostGIS PostgreSQL tables in RAM somehow? That's the slowest part in my map generating, it tooks 2-8 seconds to render layers.


Aug 10, 2011 at 11:49 PM

You can use GeometryFeatureProvider to load all your PostGis features with data to RAM. If you don't care for the data, you could use GeometryProvider

Hth FObermaier

Aug 11, 2011 at 6:30 AM

Could you show me how to create GeometryFeatureProvider from PostgreSql db with geometry tables ?

Aug 11, 2011 at 7:19 AM

Basically you do an ExecuteIntersectionQuery on the PostGis provider once, and use the resulting FeatureDataTable (inside the FeatureDataSet) as an constructor argument for the GeometryFeatureProvider

Hth FObermaier

Aug 11, 2011 at 7:54 AM

Hi Namolem,

If you use postgis databasse. There are some notice for faster render layer

- Alway use index of geometry column  : CREATE INDEX tableName_gidx ON TableName USING gist (the_geom);

- Use maintenance : Vacuum for table

Use some Algorithms for render follow:

1. Invisible layer for some zoom level

2. You can use multithread  for pan/ zoom tool.  Ex: one thread for one rendering layer ( ArcMap use multithread like that).