Hazelcast: Sorting not using index

Created on 17 Sep 2019  路  5Comments  路  Source: hazelcast/hazelcast

Hello.

In our application we have to use "BINARY" as in memory format. Using "ValueExtractor" I was able to set all the indexes needed in our application. When searching using "PagingPredicate" everything works very good and the performance is OK.

The problem is sorting. Paging predicate expects "Comparator". If in the comparator method "Entry.getValue()" is called the value has to be deserialized and the performance is very poor.
I believe there should be some possibility to use indexes when sorting?

Regards,
Milos.

IMap Query Community Core Enhancement

Most helpful comment

Hi all, we are currently working on redesigning the query engine. This, and many more, will come in one of the following minor versions.

All 5 comments

I agree with Milos, I have the same problem. Is there a possibility to use indexes while sorting?

Thanks!
Martin

Yes I agree. This is a very important feature in my opinion. We have a dataset with currently 32k entries. The database can run a query for getting the first 50 (ordered) entries in 150ms. Running the same query with a page size of only 10 on Hazelcast takes over 5s.
Also being able to create a QueryCache for PagingPredicates would be nice.

Hi all, we are currently working on redesigning the query engine. This, and many more, will come in one of the following minor versions.

Any news?

The initial version of the new query engine is about to be released next week. We'll have more information on what is and what is not possible soon. Sorting isn't possible, unless you're using a sorted index I guess. That should come in 4.2.

Was this page helpful?
0 / 5 - 0 ratings