XAP is being developed tirelessly and we are pleased to introduce one of our newest features, the Space Query plan for XAP.

It brings with it a plethora of information that can be extracted from queries run from within the live environment itself.

The Space Query plan helps stop developers falling into the pitfall of focusing only on results and not performance. A key part of application management today, it should not be neglected.

What Is Space Query Plan?

Just producing an application that allows access to the right information at the right time for users isn’t enough. The real benefit comes from speed and efficiency of these types of system interrogations, and with Space Query we are giving our customers a way to improve on both of these through the use of Explain Plan reporting. Monitoring of performance in a live environment, without placing excess strain on the system itself, is an invaluable tool when looking to drive application and cost efficiencies.

Explain Plan is not a new feature as anyone in the DB world knows; however, by introducing this type of query management into our IMC system the possibilities for developers have grown immeasurably.

Download XAP to Try Our Space Query Plan

What Does This Mean and How Can I Utilize It?

Inefficient queries can seriously slow down the execution of any application, no matter how fast the computing environment is. With Space Query now being available in XAP, these types of queries can be targeted and amended, complementing our super-fast processing power with cleaner, more responsive applications.

Currently this is available to run against extended match or compound queries and each type will yield a slightly different set of information. It can be used to help answer questions such as which index has been used and how many entries have been scanned to get the appropriate result, or to identify which specific conditions were checked against.

Space Query Plan from XAP

To run this command you simply need to follow three easy steps:

  1. Use .withExplainPlan() to indicate a query should be executed with an explain plan
  2. Execute the query as usual
  3. Use .getExplainPlan() to get the result, and print it

For example:

SQLQuery query = new SQLQuery(MyPojo.class, “price > 1000”)


Object result = gigaSpace.read(query);

What you will end up with is a report detailing steps the query has run, query parse trees, indexing information, and scanning information. All of these are presented in an easy-to-read format that can then be analyzed to find out where a query may be putting unnecessary load onto an application.

Let’s take an extended match query for example and see what this type of report might look like:

Space Query Plan Example

Here you can clearly see each stage of the query, where the data has been pulled from, how many partitions and entries were scanned, and then the exact steps taken within the query tree.

As you can imagine, this type of information is invaluable and allows the focus to shift from output to performance within the production environment. Introduction of this into In-Memory Computing is opening doors and keeping products ahead of the competition when combined with the incredible processing power it already offers.

Monitoring of this information can provide easy insight into whether your application may be querying too many entries or without proper indexing within the space for example. By amending or eradicating these types of queries as appropriate, or changing indexes of areas for example, operational performance can be greatly increased without the need for more computing power.

Overall, the introduction of this feature is a great way to drive system productivity, increase customer satisfaction, and get far more out of your IMC solution for even less.

Follow us on Twitter to learn more about what XAP can offer you. 

Space Query Plan for XAP
Aharon Moll on LinkedinAharon Moll on Twitter
Aharon Moll
Senior Professional Services Engineer @ GigaSpaces
Aharon is a Technical Account Manager for the EMEA VIP customers including UBS and SixGroup. He provides a full cycle professional consultancy from the early development phase to full production.
Tagged on: