Hi Andrey,

In case you know that all required data is stored on a single node, you can
send a closure to that node that will execute a local query:

// Execute a callable on a node where myAffinityKey is mapped.
ignite.compute().affinityCall("my-cache", myAffinityKey, new
IgniteCallable<List&lt;List&lt;?>>>() {
    @Override public List<List&lt;?>> call() throws Exception {
        IgniteCache cache = Ignition.ignite().cache("my-cache");
        
        // Note the setLocal(true) flag.
        return cache.query(new SqlFieldsQuery("select * from
...").setLocal(true)).getAll();
    }
});

Will this work for you?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Sql-query-performance-with-partitioned-caches-tp2700p2708.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to