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.