Thanks for looking at this thread. First, I am not even sure on the correct title for this question, and not really sure how to ask the question. I have multiple boundaries that contain address points, I am running a query that takes the boudary and then finds all the address points that are contained within. On boundaries with a small number of address points the query files right through, on more heavily populated areas it takes longer naturally.
The problem is server load, if I run these queries first thing in the morning they run right through, as the day goes on and more users are on the server, the small queries run okay, but the larger queries take forever or time out. I do realize it is a resource problem that is not going to change.
I have broken the queries down so I am running the smallest boundaries that I can, instead of running it against the entire layer, I have broke it down to zones that make up the layer and running each of those individually.
So what I need is to be pointed in the right direction as to what to next, I cannot break up the larger zones into smaller zones, or reduce the number of address points within a zone.
I am taking the shape of the zone and setting the spatial relationship to esriSpatialRelNum.esriSpatialRelIntersects, then running it against the layer containing the addresses.
pSpatialQ = New SpatialFilter
pSpatialQ.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects
pSpatialQ.WhereClause = "HouseNum = '" & theAddress & "'"
pSpatialQ.Geometry = pFeature.Shape
pFeatCur = plLayer.Search(pSpatialQ, True) 'False)
pFeat = pFeatCur.NextFeature
I have went through the setting for the SpatialQuery and I see nothing else that can be used to possibly speed up the query, if there is somthing please let me know.
If there is another way to do this, just point me in the right direction.
I do not mean to be vague, but I have been tasked to resolve this issue with code adn I just have to figure out where to go from here.
Thanks, Dale
The problem is server load, if I run these queries first thing in the morning they run right through, as the day goes on and more users are on the server, the small queries run okay, but the larger queries take forever or time out. I do realize it is a resource problem that is not going to change.
I have broken the queries down so I am running the smallest boundaries that I can, instead of running it against the entire layer, I have broke it down to zones that make up the layer and running each of those individually.
So what I need is to be pointed in the right direction as to what to next, I cannot break up the larger zones into smaller zones, or reduce the number of address points within a zone.
I am taking the shape of the zone and setting the spatial relationship to esriSpatialRelNum.esriSpatialRelIntersects, then running it against the layer containing the addresses.
pSpatialQ = New SpatialFilter
pSpatialQ.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects
pSpatialQ.WhereClause = "HouseNum = '" & theAddress & "'"
pSpatialQ.Geometry = pFeature.Shape
pFeatCur = plLayer.Search(pSpatialQ, True) 'False)
pFeat = pFeatCur.NextFeature
I have went through the setting for the SpatialQuery and I see nothing else that can be used to possibly speed up the query, if there is somthing please let me know.
If there is another way to do this, just point me in the right direction.
I do not mean to be vague, but I have been tasked to resolve this issue with code adn I just have to figure out where to go from here.
Thanks, Dale