Select to view content in your preferred language

AGSQuery Result Limit?

675
2
07-20-2010 07:23 AM
JeffPapirtis
Occasional Contributor
Is there a limit on the number of results that can be returned using the AGSQuery Task?
my querry only returns a few of the records that I need.

Code example:

AGSQuery * query1 = [AGSQuery query];
query1.where = @"State = 'TX'";
query1.outfields = [NSArray arrayWithObject:@"*"];
[self.query1QueryTask executeWithQuery: query1];

from what I can gather the .where statement queries the attribute field State and returns those records that match the State = TX. 

Well this only returns a few results.  I am expecting to get over 3000 results.  it only returns a handful. 

is there a set limit that AGSQuery can handle?  if so what is that Limit?

Please help?!
0 Kudos
2 Replies
JeremyBixby
Regular Contributor
This is a limit on the ArcGIS Server service.  Log in to your ArcGIS Server machine, and navigate to C:\Program Files\ArcGIS\server\user\cfg.  Open the .cfg file for the service you are trying to access.  Change the <MaxRecordCount> property to whatever you need it to be.  Be sure to restart the map service and clear out the cache.

Actually, would you mind posting back about this?  I would love to hear how the iphone sdk handles over 3000 graphics!
0 Kudos
JeffPapirtis
Occasional Contributor
3000 graphics tends to slow down the device a bit, but I think that most of the slowdown is on the server side performing the query.  On average it took about 15 seconds on the iPad simulator to draw 3000 graphics.  not terribly bad considering it took about 30 seconds on our flex application to do the same thing.

Thanks for pointing me to the file location!
0 Kudos