Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. index conditions joint with OR;
  2. different sort order: idx(ts desc, price asc) but query(ts desc, price desc);
  3. Cache is wide and IndexScan on few fields is much cheaper than ScanQuery;
  4. predicatesetFilter operation with a custom user condition.


IndexName is optional. If it's not specified than take PK index of specified table.


Code Block
languagejava
// The "predicate" operation can't find best index for a user query. So user must provide an index name for this operation. 
QueryCursor<Cache.Entry<Long, Good>> cursor = ignite.cache("GOOD").query(
	new IndexQuery<>("GOOD_TBL", "GOOD_TS_DESC_PRICE_ASC_IDX")
		.predicatesetFilter((good) -> good.ts > lastMidnightTs || price > 100)
);

...