@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface Query
Modifier and Type | Optional Element and Description |
---|---|
boolean |
collocated
Sets flag defining if this query is collocated.
|
boolean |
distributedJoins
Specify if distributed joins are enabled for this query.
|
boolean |
dynamicQuery
Specify whether the annotated method must provide a non null
DynamicQueryConfig parameter with a non
empty value (query string) or DynamicQueryConfig.textQuery() == true. |
boolean |
enforceJoinOrder
Sets flag to enforce join order of tables in the query.
|
boolean |
forceFieldsQuery
Force SqlFieldsQuery type, deactivating auto-detection based on SELECT statement.
|
boolean |
lazy
Sets lazy query execution flag.
|
int |
limit
Sets limit to response records count for TextQuery.
|
boolean |
local
Sets whether this query should be executed on local node only.
|
int[] |
parts
Sets partitions for a query.
|
boolean |
textQuery
Whether annotated repository method must use TextQuery search.
|
int |
timeout
Query timeout in millis.
|
String |
value
Query text string.
|
public abstract String value
public abstract boolean textQuery
IgniteClient
is used for accessing the Ignite cluster, use Ignite
node instance instead.RepositoryConfig.igniteInstance()
public abstract boolean forceFieldsQuery
public abstract boolean collocated
Collocation flag is used for optimization purposes of queries with GROUP BY statements. Whenever Ignite executes a distributed query, it sends sub-queries to individual cluster members. If you know in advance that the elements of your query selection are collocated together on the same node and you group by collocated key (primary or affinity key), then Ignite can make significant performance and network optimizations by grouping data on remote nodes.
Only applicable to SqlFieldsQuery
public abstract int timeout
Only applicable to SqlFieldsQuery and SqlQuery
public abstract boolean enforceJoinOrder
true
query optimizer will not reorder
tables in join. By default is false
.
It is not recommended to enable this property until you are sure that your indexes and the query itself are correct and tuned as much as possible but query optimizer still produces wrong join order.
Only applicable to SqlFieldsQuery
public abstract boolean distributedJoins
Only applicable to SqlFieldsQuery and SqlQuery
public abstract boolean lazy
By default Ignite attempts to fetch the whole query result set to memory and send it to the client. For small and medium result sets this provides optimal performance and minimize duration of internal database locks, thus increasing concurrency.
If result set is too big to fit in available memory this could lead to excessive GC pauses and even OutOfMemoryError. Use this flag as a hint for Ignite to fetch result set lazily, thus minimizing memory consumption at the cost of moderate performance hit.
Defaults to false
, meaning that the whole result set is fetched to memory eagerly.
Only applicable to SqlFieldsQuery
public abstract boolean local
public abstract int[] parts
Note what passed array'll be sorted in place for performance reasons, if it wasn't sorted yet.
Only applicable to SqlFieldsQuery and SqlQuery
public abstract boolean dynamicQuery
DynamicQueryConfig
parameter with a non
empty value (query string) or DynamicQueryConfig.textQuery()
== true.
Please, note that DynamicQueryConfig.textQuery()
annotation parameters will be ignored in favor of those
defined in DynamicQueryConfig
parameter if present (runtime ignite query tuning).
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024