ThinkGeo.com    |     Documentation    |     Premium Support

Query Performance

Hello all,


if i want to get complete address(contains corssroads), i have to query different layer and get its information.


but i hope query time can decrease...


Could you give me some idea about improve query performance?                                                                                                                                  


I show different query time as follows:


Query_County:00:00:00.0810047

Query_Road:00:00:00.1120064

Query_Node00:00:00.0090005

QueryADR:00:00:00.1680096



Query_County:00:00:00.0080004

Query_Road:00:00:00.0140008

Query_Node00:00:00.0050003

QueryADR:00:00:00.1250071



Query_County:00:00:00.0110007

Query_Road:00:00:00.0110007

Query_Node00:00:00.0070004

QueryADR:00:00:00.1310075




it spend much time in QueryADR.


it code as follows:


               Dim QueryADR As Date

                QueryADR = DateTime.Now()

                Dim road_Layer As ShapeFileFeatureLayer = New ShapeFileFeatureLayer(varADR & "r_10001.shp")

                cross_SQL = "select distinct ADR from [r_10001] where tnode='" & nodeid & "' or fnode='" & nodeid & "'"

                road_Layer.Open()

                road_DT = road_Layer.QueryTools.ExecuteQuery(cross_SQL)

                road_Layer.Close() 

                system.console.write("QueryADR:" & (DateTime.Now - QueryADR).ToString() & vbNewLine )


is it wrong in my code?


in addition to my code, which side i still need pay attention?


 



Carol,


Merry Christmas and Happy New Year.  Thanks for your post and question


In our component, what we did to implement the SQL query is just a wrapper about the OLEDB, so if you want, you could have a try to see it will make any difference by using the OLEDB directly, for more details you can have a look at the sample code in following post:

gis.thinkgeo.com/Support/Dis...aspx#10062


For this performance problem, I can think about 2 ways to go aournd:

1) Import the data to SQL server, build index for it, do query on MsSql2008FeatureLayer. This should be improved for the Index built on SQL Server.

2) If you want to do the Address query, you could have a look at our other product GeoCoder which can combine closely with Desktop Edition.


If you are interested, please contact our support (support@thinkgeo.com) or look at the introduction:

gis.thinkgeo.com/Products/GI...fault.aspx


Any more questions just feel free to let me know.


Thanks.


Yale