<div>Hi All,</div>
<div>&nbsp;</div>
<div>I've got some problems when I am trying to draw a route on an map image with MapServer(Using C# API). </div>
<div>&nbsp;</div>
<div>The routing results are provided by a third party application in an XML format, this XML file contains all the required line segment IDs for the route. In the vector layer containing the route line segments the segment ID is the primary key of&nbsp;the attribute table, therefore I tried to make a query using the line segment IDs specified in the XML file on the target vector layer. Unfortunately this query process takes very long, I can not even get any query results from MapServer, it seems that MapServer is crashed and doesn't react any more. I've tried with both ESRI Shapefile and MapInfo TAB file, but I still can not get anything encouraged me to continue it. 
</div>
<div>&nbsp;</div>
<div>I am using the QueryByAttribute function to make the query. Here I have some doubts and questions about QUERY in MapServer, hope that I can get some hints from you guys.</div>
<div>&nbsp;</div>
<div>1. if I use the MapInfo TAB file for query, does the spatial index of MapInfo vector layer will be used&nbsp;during the query? if the query use the primary key of the attribute table, will any query algorithm be implemented for it? AFAIK, the index of the attribute table will be used if I make a query in MapXtreme with the MapInfo TAB files, and this impressively speed up the query performance.
</div>
<div>&nbsp;</div>
<div>2. if using ESRI shapefile as the query target, will any spatial index or attribute index be used for the query?</div>
<div>&nbsp;</div>
<div>there is something I must mentioned here:</div>
<div>the target vector layer is very large, more than 700MB, and the attribute table contains about 5800000 records.</div>
<div>&nbsp;</div>
<div>thanks for any advice.</div>
<div>&nbsp;</div>
<div>Zhonghai</div>