Just using SQL doesn’t automatically make your query faster (though it might), 
but it does mean you can use things like indexes.

To use SQL on a cache, you need to define Query Entities. See the sample code 
for an example:

https://github.com/apache/ignite/blob/f37ec9eece4db627f2d5190e589f0522e445a251/modules/platforms/cpp/examples/query-example/src/query_example.cpp
 
<https://github.com/apache/ignite/blob/f37ec9eece4db627f2d5190e589f0522e445a251/modules/platforms/cpp/examples/query-example/src/query_example.cpp>

See example-query.xml for the definition of the query entities.

Regards,
Stephen

> On 11 Mar 2021, at 12:33, rakshita04 <[email protected]> wrote:
> 
> Hi Team,
> 
> We are using apache-ignite node for our C++ application.
> For one of the scenarios we need to get the result based on value of the the
> columns(which is not key field).
> If we do a getAll() on DB node then we have to linearly search the whole
> Database which is taking too much time in case of more records.
> If we run sql select query on the column value on our key-value cache, then
> will it be faster than linear search? 
> Do we need to use "indexing" for faster results?
> if yes can we create index on our existing key-value cache? if yes how?
> 
> regards,
> Rakshita 
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Reply via email to