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

Load data from shape file or load data from DB ? Which is faster

Feb 14, 2011 at 11:53 AM
Edited Feb 14, 2011 at 11:54 AM

Hi everybody,

I'm getting a big project and I have to load many layers simultaneously, Can anybody tell me which is faster ? Load data from shape file or load data from database.


Feb 23, 2011 at 1:57 PM

I dont know which one is faster but I think it depends on your bussiness rules and the data available.

I use myself a mix up with shapefile base carto, some sql server 2008 and OleDbPoint provider (I like it because you can apply a definition query) for some oracle tables with Lat/Lon values.

Feb 24, 2011 at 2:57 AM

I tried to  load some layers that shape files have capacity more than 150MB, If I load from DB it is so much faster.  I think with large layers we should load from DB

Feb 24, 2011 at 7:24 AM

The "poor" performance of the shapefile provider is probably due to the fact that the spatial (quad-tree) index is created once on setup on first call to Open(). That may take some time on a shapefile that size.

The database providers rely on the spatial index of the database, that does not have to be created. If it is not there, it is not used.

I don't exactly know if there is a way to save the quadtree spatial index, and if so, how it work. But you may get better performance going that way.

If you want to sort out features by some attribute criteria, you are -probably- better of with database providers and setting the DefinitionQuery property. It should work out better than ShapeFile providers filter delegate method.

Hth FObermaier