Hello. I have developed a mapping application using ArcGIS Runtime SDK for Android. Now the program is used by 1000 people per day. Now, there is a very basic query operation: move the screen and query if there are any intersecting features at that screen location, which is a function to select features. However, from the database monitoring, these selection functions are executed too frequently, resulting in long session blocking. Is there a solution that can optimize this method of selecting features, reduce the number of requests for service queries, and reduce the pressure on the database? Some of the feature service that are queried are more read and less service, and some are more read and more write tables.
The following is a statement that executes a simple query with high frequency. It was requested 150W times in one day.
If anyone knows an optimization plan, I'd appreciate it. Thanks!
Few things to consider:
To help optimize the number of service query requests, there are 3 caching options to choose from when querying from when querying from a service:
Check out the API ref: Link
We have a sample app demonstrating the caching functionality, you can use this to consider which caching mode best fits your app.
A helpful tip is to set the maximum number of features to be included in the result as part of your QueryParameters, this will help stop users from zooming out and loading a ridiculous amount of features.
QueryParameters.setMaxFeatures(int maxFeatures)