What is the performance impact of using a Match All filter?


(Aniruddha) #1

As part of query optimization for a project, I'm considering replacing a range filter on document id (cached and due to range passed as parameters, is returning everything like match all) with a match all filter. I'm wondering if this will improve performance?

My assumption is that upon execution the system would simply ignore this filter and I can get improvements in memory+disk usage (removed the cached filter) as well as some execution time. Is this correct?

In context of version 1.7.


(Lee Hinman) #2

I'm not quite sure I understand your question, you are doing a range filter on a document ID, but you want to replace it with a match_all filter?

Is there a reason you aren't use the ids filter for this?


(Aniruddha) #3

Because I'm not looking for a specific id, but for a range.
And I don't know if there is any optimization achieved using this filter.

My question -- I have a query designed to take a range of document ids in most scenarios. However, in a special case I pass a range (0, max_possible_number) that essentially means return me everything and I'm considering replacing this special case with a Match All filter.


(Lee Hinman) #4

However, in a special case I pass a range (0, max_possible_number)
that essentially means return me everything and I'm considering
replacing this special case with a Match All filter.

Okay, I would expect replacing a range over all the ids with a
match_all query to be faster than using the range query.


(system) #5