Documents of products collection are intentionally designed to be more complex and larger than accounts - I want to see what happens, what is the performance penalty mainly, once individual documents are stored on multiple database pages. In Postgres, page size is 8 KB by default - in practice, the goal is to have at least 4 rows stored on a single page, so every record that is larger than 2 KB is put on two or more disk pages. It obviously reduces performance for both writes & reads - more disk pages to read from and write to. In Mongo it works slightly differently in details, but essentially in the same vein - larger documents are stored on more than one page, degrading performance for all operations. In both cases we are about to see - how much exactly.
Trap-and-emulate: IOPL-sensitive instructions
,更多细节参见夫子
To be clear, copyright law isn’t a choose your own adventure book. There’s no such thing as a “dual copyright” regime under U.S. law—no parallel terms running simultaneously, no option to select whichever happens to be longer.
// 复制数组(避免原数组被修改影响其他测试)