Querying the Space Using GigaSpaces API

This section explains the various mechanisms offered by GigaSpaces GigaSpaces to query the space for data:

  • ID query - Retrieve objects from the Space based on the Primary Key.
  • Query by template - Find data based on template matching (a.k.a. Match by example).
  • SQL query - The SQLQuery class is used to query the space using SQL-like syntax.
  • SQL Function - You can query the Space using built-in and user-defined functions.
  • Geospatial query - Use geometry data types such as points, circles and polygons (these queries consider the spatial relationship between the geometries).
  • Nested property query - Use SQL queries on nested properties, maps and collections.
  • Query with user-defined classes - Query by matching a user-defined class.

You can also perform a free text search for records that include one or more words within a free text field, and a full text search that leverages the Lucene search engine library.

The following related topics describe how to use indexing to boost query performance, and how the Space can be iterated to fetch entries more efficiently:

  • Paging support - Reading a large number of objects using multiple queries in one call, in a continuous manner.
  • Partial results - Projection - You can obtain partial results when querying the Space, to improve application performance and reduce the memory footprint.
  • Explain Plan - This can be used to obtain a description of the strategy or plan that GigaSpaces uses to implement a specific SQLQuery.

Additional Resources