OGR JOIN performance problem on Linux
Bart van den Eijnden
bartvde at XS4ALL.NL
Thu Aug 12 00:27:11 PDT 2004
Hi Frank,
Seems like a silly question, but how do you index shapefiles with ogr? I
can't seem to find it anywhere.
Thanks in advance.
Best regards,
Bart
> Dirk Jesko wrote:
>> Hello,
>>
>> I have two machines running Apache 2 with MapServer 4.2.* (all necessary
>> libraries are the current stable versions). One map server is running on
>> Windows XP the other on Linux. Both systems contain the same data and
>> mapfiles (besides the paths of course). One of the layers is an OGR
>> connection to two shape files which are joined. One file contains
>> approx. 200 rows with information the other approx. 30000 points with
>> references to the information. The points are displayed. Both shapes
>> have indexes associated (created separately on the according machine).
>> While the join-query is very fast on Windows (it takes only a few
>> seconds to display all points if the index is present), it takes ages on
>> Linux (it makes no difference whether there is an index or not).
>> Sometimes the web server even returns an error since the query takes to
>> long. My guess would be that map server (resp. OGR) does not use the
>> index on Linux.
>>
>> I would like to know whether someone observed a similar behavior and
>> whether there is a possibility to speed up the query on Linux.
>
> Dirk,
>
> There is no *fundamental* reason the index shouldn't work as well on linux
> as on windows. Did you create the index on linux? When you index a
> shapefile
> a .idm file should be created with information on what indexes are in
> effect
> and a .ind file with the actual indexes. The .idm file is just XML. Take
> a
> look at it and verify that the information seems sensible ... particularly
> that
> there is nothing funny about the filename used for the MIIDFilename. You
> might
> want to try making it an absolute path to the file.
>
> The development and performance testing was done on Linux.
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent
>
More information about the MapServer-users
mailing list