Reputation: 3
What should I use cache.put(key, value) or cache.query("INSERT INTO Table ")?
Upvotes: 0
Views: 392
Reputation: 2157
Any. Or both.
One of the powers of Ignite is that it's truly multi-model - the same data is accessible via different interfaces. If you migrate a legacy app from an RDBMS, you'll use SQL. If you have something simple and don't care about the schema or queries, you'll use key-value.
In my experience, non-trivial systems based on Apache Ignite tend to use different kinds of access simultaneously. A perfectly normal example of an app:
Upvotes: 2
Reputation: 885
In case you properly configured queryable fields for your cache you can use both ways to insert data into the cache:
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.
Upvotes: 2