Search code examples
ignite

Apache Ignite: Сache API vs SQL


What should I use cache.put(key, value) or cache.query("INSERT INTO Table ")?


Solution

  • In case you properly configured queryable fields for your cache you can use both ways to insert data into the cache:

    1. Key-Value API as shown here.
    2. SqlFieldsQuery as described here.

    Also, in case you would like to upload a large amount of data you can use Data Streamer, which automatically buffer the data and group it into batches for better performance.