VS: [mapserver-users] Mapserver search performance
Mark Korver
mwkorver at gmail.com
Tue May 3 14:05:30 PDT 2011
Spatialite jumps into my mind.
http://www.gaia-gis.it/spatialite/
On Tue, May 3, 2011 at 3:19 PM, Varun saraf <vsaraf.gmu at gmail.com> wrote:
> Hi,
>
> Thanks a lot Andreas. That JOIN was the culprit as you rightly
> suggested. Once I removed the join, the performance increased
> exponentially. The 5 minute cgi run now took under 5 seconds which is
> simply amazing. I just need one more help. Is there a DBF editor out
> there that can be used to import the fields from any external data
> source into the shapefile attribute DBF without affecting the
> structure? I looked for a lot but they do not have the capability of
> doing a JOIN based on a common field and pulling data into the
> shapefile DBF automatically. My company cannot afford the ArcGis
> software.
>
> Thanks,
> Varun
>
> On Fri, Apr 15, 2011 at 2:40 AM, Eichner, Andreas - SID-NLKM
> <Andreas.Eichner at sid.sachsen.de> wrote:
>>
>> Hi,
>>
>> AFAIK dBase files don't provide an index themselves and there's no other
>> way to provide one. shptree only creates an spatial index. Therefore
>> only queries like 'does this geometry touch/intersect/lie within a given
>> rectangle'can be accelerated.
>>
>>> I tried the shptree tool but did not see any performance improvement.
>>
>> So this becomes clear: By doing a JOIN MapServer basically runs a loop:
>> for each geometry that matches search withing external data for a line
>> matching the join condition.
>>
>>> Could it be because all of this information that I require is coming
>>> from an external DBF file that I join to the layer/shape's DBF? Will
>>> including all these fields/information in the shape's DBF file itself
>>> help?
>>
>> I'm pretty sure that this would help, since this would avoid the
>> (unaccelerated) join. With a database like PostgreSQL/PostGIS or SQlite
>> it's basically the same problem: if you don't create an appropriate
>> index for the join condition, this becomes an costly operation. Although
>> those columns are usually primary and foreign key columns with
>> appropriate index and the join condition is usually a simple equality
>> match.
>>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list