Hi,

I have tested speed of random access to PostGIS features with simple
testing application.

    // about 1e4 points
    poLayer = poDS->GetLayerByName("bridges");

    nfeatures = poLayer->GetFeatureCount();

    for (int fid = 1; fid < nfeatures; fid++)
        poFeature = poLayer->GetFeature(fid);

and sequential access

    while(1) {
        poFeature = poLayer->GetNextFeature();
        if (!poFeature)
            break;
    }

I would expect that random access will be slower, anyway not so much.

random access

real    0m5.612s
user    0m1.432s
sys     0m0.512s

sequential access

real    0m0.248s
user    0m0.116s
sys     0m0.012s

Are there any possibilities how to speed up random access (not
speaking about sample application where should be used seq access).

Thanks in advance, Martin

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to