Select to view content in your preferred language

How to reduced query result limit..?

4361
17
08-06-2018 10:02 AM
Rocky_
by
Frequent Contributor

I am trying to query feature from service url. which having set  MaxRecordCount: 100000 ..

is there any possible way to reduced the limit for query results, cause this MaxRecordCount: 100000 giving me error of Timeout exceeded and Error performing query operation. 

Can anyone please tell me how to solve this issue.

Thanks in advance..

0 Kudos
17 Replies
RobertScheitlin__GISP
MVP Emeritus

Sure that is controlled at the map service level. Go to server manager and adjust the maxRecordCount property

Rocky_
by
Frequent Contributor

I cant change the property on service itself. Is it any other way to do it..within the script..??

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Not that I am aware of

0 Kudos
Rocky_
by
Frequent Contributor

No worries.. Thanks for help.. Really appreciate that..

0 Kudos
HezronPhilip
Occasional Contributor

Hi,

I'd suggest an alternative: First attempt to query for Object IDs (QueryTask | API Reference | ArcGIS API for JavaScript 3.25 ) and check how many features you are getting in the response. Using the object IDs in the response, you can query about half of the Object IDs to retrieve the features to test your response time. If it is still too long, you can again split it in half. Splitting your queries can reduce response time from the server.

Rocky_
by
Frequent Contributor

Thanks for information. I'll try this one.. 

0 Kudos
HezronPhilip
Occasional Contributor

Hi Raj,

I would also suggest that when returning such a huge number of features, do not return geometry. (Although that would depend on what you are trying to attempt with the query)

set returnGeometry = false to get better response times in your query while attempting to query large number of features and then retrieve geometry on selection from a list of the returned features maybe.

Rocky_
by
Frequent Contributor

Thanks for the suggestion Philip. I'll try this solution.. lets see how it works..

0 Kudos