pub struct Opening {
pub reads: u32,
pub bytes: u64,
}Expand description
What Reader::open read before it returned.
spec/stats/04-in-memory.md section 4.2 says opening a table reads the header and the directory
and nothing else, and once that document’s statistics are in the file the tempting change is to
load a column summary or two on the way past, because they are small and the next query will
want them. A hundred milliseconds of that is a hundred milliseconds nobody asked for, and an
embedded database is opened by processes that are about to run one trivial query.
So the claim gets a number. Both of these are fixed by the schema and the stripe count and are independent of how many rows the file holds, and the test that says so is what stops the tempting change from landing quietly.
Fields§
§reads: u32How many times the file was read. The header, then each directory slot that looked valid enough to check, so three at the most.
bytes: u64How many bytes those reads asked for.