...ArcGIS Server map services limit the number of records that can be returned by a query to 1,000 by default. Keep this value or lower it for best performance with queries. You can change the number of allowable result records by editing the MaxRecordCount property in the map service configuration file.
Use caution if you raise the default value. Queries that return more than 2,000 records require the software to create scratch workspaces in your system TEMP directory to manage the result records. This can cause performance to degrade...