201k views
1 vote
consider standard ordering of posting list by doc id. if we want to minimize memory usage during query execution is it better to use term-at-a time or document-at-time execution?Why?

User SiN
by
7.7k points

1 Answer

2 votes

Final answer:

To minimize memory usage during query execution, it is better to use term-at-a-time execution instead of document-at-a-time execution.

Step-by-step explanation:

When considering memory usage during query execution, it is better to use term-at-a-time execution. This approach processes one term at a time and retrieves only the relevant documents for that term. This minimizes memory usage by avoiding the need to load all documents into memory.

With document-at-a-time execution, all documents are loaded into memory and processed one document at a time. This can lead to high memory usage, especially if the posting lists for each term are large.

By using term-at-a-time execution, only the necessary documents are loaded, resulting in less memory usage and more efficient query execution.

User Kenny Saelen
by
8.5k points