6.4. Explaining Query Plans¶
Given a data store and a query, you can ask GeoMesa to explain its plan for how to execute the query:
dataStore.getQueryPlan(query, explainer = new ExplainPrintln);
ExplainPrintln, you can also use
ExplainLogging to redirect the explainer output elsewhere.
ExplainLogging in GeoServer, see Logging Explain Query Planning. It may also be helpful to refer to GeoServer’s Advanced log configuration documentation for the specifics of how and where to manage the GeoServer logs.
Knowing the plan – including information such as the indexing strategy – can be useful when you need to debug slow queries. It can suggest when indexes should be added as well as when query-hints may expedite execution times.