[GIS] What are the options for working around the max number of records returned for a query task on ArcGIS Server 9.3.1

arcgis-9.3arcgis-serverquery

I'm trying to return polygon features that intersect a larger polygon which defines my area of interest. It is working in some cases, but when the area of interest gets large (7000 intersecting records) it is not working. The MaxRecordCount property in the configuration file at ArcGIS install location\Server\user\cfg\configuration file name.cfg was increased to 10,000 but still no records were returned. I have read about an upper limit of 2000 records and the queries that are working correctly return less than this number of records. One idea is to split the area of interest into parts. An FAQ I read suggest to iterate through consecutive blocks of results on the client by using the field that contains a unique key (e.g. primary key) to track progress. And it seems the number of attributes in the records returned may have an impact. What works for others?

I am not the programmer, but I'll include the code being used.

     Private Sub QueryTask_ExecuteCompleted_Zoom_Filter_Events_Layer(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.Tasks.QueryEventArgs)

        'special code just for Event Filter option
        'save the selected polygon to use to retrieve all parcels within it

        Try


            Dim featureSet As FeatureSet = args.FeatureSet

            Dim myGraphicsLayerSelectedFeature As ESRI.ArcGIS.Client.GraphicsLayer = TryCast(MyMap.Layers("GraphicsLayerSelectedFeature"), 
                                         ESRI.ArcGIS.Client.GraphicsLayer)
            myGraphicsLayerSelectedFeature.ClearGraphics()

            If featureSet IsNot Nothing AndAlso featureSet.Features.Count > 0 Then

                Dim selectedFeature As Graphic = featureSet.Features(0)

                ' *****************************************************
                ' Hightlight selected feature
                selectedFeature.Symbol = TryCast(gridGISMapInteractive.Resources("BlueLineFillSymbol"), ESRI.ArcGIS.Client.Symbols.Symbol)
                'graphicsLayer.Graphics.Add(selectedFeature)
                myGraphicsLayerSelectedFeature.Graphics.Add(selectedFeature)


                ' *****************************************************
                ' Zoom to selected feature (define expand percentage)
                Dim selectedFeatureExtent As ESRI.ArcGIS.Client.Geometry.Envelope = selectedFeature.Geometry.Extent

                Dim expandPercentage As Double = 90

                Dim widthExpand As Double = selectedFeatureExtent.Width * (expandPercentage / 100)
                Dim heightExpand As Double = selectedFeatureExtent.Height * (expandPercentage / 100)

                'save the selected polygon envelope
polygonExtent = New ESRI.ArcGIS.Client.Geometry.Envelope(selectedFeatureExtent.XMin, selectedFeatureExtent.YMin, selectedFeatureExtent.XMax, 
                     selectedFeatureExtent.YMax)
                MyMap.ZoomTo(polygonExtent)


                ' *****************************************************
                'query the parcels in the selected filter polygon
                Dim strQueryLayerID As String = CType(Convert_Web_Service_Layer_Name_To_Index("Parcel MBL"), String)

                'query a specified layer to find data that intersect with the polygon buffer around the selected point
                Dim queryTask As New QueryTask(CityOfWorcester.Url & "/" & strQueryLayerID)
                AddHandler queryTask.ExecuteCompleted, AddressOf QueryTask_ExecuteCompleted_Polygon_Parcels_Filter_Events
                AddHandler queryTask.Failed, AddressOf QueryTask_Failed_Polygon_Parcels

                Dim query As New ESRI.ArcGIS.Client.Tasks.Query()
                query.ReturnGeometry = True
                'query.Geometry = polygonExtent
                'query.Geometry = selectedFeature.Geometry
                query.Geometry = selectedFeatureExtent
                'query.SpatialRelationship = SpatialRelationship.esriSpatialRelContains
                query.SpatialRelationship = SpatialRelationship.esriSpatialRelIntersects


                'specify which fields to return (must be case specific)
                'Output Fields are specific to the layer being queried

                query.OutFields.AddRange(New String() {"X_COORD"})
                query.OutFields.AddRange(New String() {"Y_COORD"})
                query.OutFields.AddRange(New String() {"HOUSE_NO"})
                query.OutFields.AddRange(New String() {"STREET"})
                query.OutFields.AddRange(New String() {"GISGPV_MBL"})
                query.OutFields.AddRange(New String() {"MBL"})


                queryTask.ExecuteAsync(query)


            End If

        Catch ex As Exception
            HandleError(ex, False)
        End Try

    End Sub

Best Answer

I don't have a 9.3 server to screenshot.
but here as a 10.1
10.1

Related Question