ArcGIS Server returns the error message, "Failed to execute query" when executing a query at REST with the Result Offset and/or Result Record Count parameter provided against an image service with the mosaic dataset stored in an enterprise geodatabase or database management system (DBMS).