You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We find the minimum fetch hints from the column iterators first
letmut min = None;
for it in&self.column_iterators{
let hint = it.fetch_hint();
if hint != 0{
if min.is_none(){
min = Some(hint);
}else{
min = Some(min.unwrap().min(hint));
}
}
}
min.unwrap_or(ROWSET_MAX_OUTPUT)
};
If there is any hint from column iterators, we choose the minimum of remaining items N, so that we can issue as few I/O as possible for this round. This number N can be:
very large (e.g., >= 200k)
not accurate (e.g., there could be columns with remaining_items == 0, and they have to issue I/O for this round. We cannot determine the best fetch_size for now.)
not limited by ROWSET_MAX_OUTPUT. This value will only be used when there's no hint from any of the columns. The naming of this const is somehow misleading 🤪
We should find a better way to determine fetch_size. e.g., by removing fetch_hint interface and solely base on the column index information.
The text was updated successfully, but these errors were encountered:
My idea is that a fetch size vec corresponds to the fetch size for each column. if a certain size is 0, it will be skipped directly, and no io is needed. 🥺
old -> [col1_fetch_size= 15, col2_fetch_size= 10, col3_fetch_size= 0] will use ROWSET_MAX_OUTPUT directly.
my opinion is: [col1_fetch_size= 15, col2_fetch_size= 10, col3_fetch_size= 0] -> [col1_fetch_size= 10, col2_fetch_size= 10, col3_fetch_size= 10] so we get the minimum value is 10 and compare ROWSET_MAX_OUTPUT
Currently, the logic is like:
risinglight/src/storage/secondary/rowset/rowset_iterator.rs
Lines 108 to 122 in fea5e0b
If there is any hint from column iterators, we choose the minimum of remaining items N, so that we can issue as few I/O as possible for this round. This number N can be:
ROWSET_MAX_OUTPUT
. This value will only be used when there's no hint from any of the columns. The naming of this const is somehow misleading 🤪We should find a better way to determine
fetch_size
. e.g., by removingfetch_hint
interface and solely base on the column index information.The text was updated successfully, but these errors were encountered: