milvus-io / milvus

A cloud-native vector database, storage for next generation AI applications
https://milvus.io
Apache License 2.0
30.03k stars 2.88k forks source link

[Enhancement]: query optimization: reduce io when retrieve output fields #31822

Closed longjiquan closed 5 months ago

longjiquan commented 6 months ago

Is there an existing issue for this?

What would you like to be added?

流程图

Above figure illustrates how milvus handles a query request:

We already optimize step 1 & 2 by pushing down the limit operator to the segment, which reduce the sort operation of step 2. However, step 1 may be also very inefficient. With mmap enabled, retrieving the output fields may cost big io compared to retrieving raw data from memory. However, in the reduce phase, in fact many candidates in the segment results will be discarded, so the prefetched io was wasted. So does the proxy's reduce.

So I want to optimize the query workflow by changing the way of retrieving the required output fields:

Why is this needed?

Reduce the io when retrieving output fields and thus increase the qps.

Anything else?

No response

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.