SqlQuery
The SQLQuery API supports ANSI-99 SQL queries against caches. This API allows SQL joins against collocated entries on the same node as well as non-collocated distributed joins. In replicated mode, SQL joins are easy to execute as all entries are replicated in all cluster nodes, but for partitioned mode, a few nodes may not contain the primary backup, hence distributed joins become complex. Apache Ignite recommends to use affinity keys to store related entries together, so a player and their club must be collocated for faster distributed query processing.
Apache Ignite's @QuerySqlField annotation makes fields accessible for SQL queries. We can even index the fields for a faster query by setting the annotation value: @QuerySqlField(index=true) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access