CPC G06F 16/27 (2019.01) [G06F 16/2246 (2019.01); G06F 16/24568 (2019.01)] | 14 Claims |
1. One or more non-transitory computer-readable media storing computer-executable instructions that, when executed by a processor, perform a method for improving performance when dropping database snapshots in a database, the method comprising:
receiving a request to drop a snapshot, the snapshot comprising read-only static content of the database as of a last system save point in time;
iterating a first converter tree to identify a first physical page number to be loaded, wherein iterating the first converter tree comprises traversing the first converter tree according to a first order in which nodes of the first converter tree were created;
loading a physical page corresponding to the first physical page number;
iterating a second converter tree to identify a second physical page number to be loaded, wherein iterating the second converter tree comprises traversing the second converter tree according to a second order in which nodes of the second converter tree were created, wherein the second order is the same as the first order, wherein the first converter tree is associated with a first snapshot and the second converter tree is associated with a second snapshot adjacent, in time, to the first snapshot, and wherein the first converter tree and the second converter tree are tree data structures each comprising a root node, one or more intermediate nodes, and a plurality of leaf nodes, the leaf nodes comprising a plurality of mappings from logical page numbers to physical page numbers;
comparing physical page numbers for corresponding leaf nodes of the first converter tree and the second converter tree;
responsive to determining that a second physical page associated with the second physical page number was read from disk during said iterating the first converter tree, linking a leaf node for the second physical page number to a leaf node for the first physical page number;
responsive to determining that one or more physical pages associated with the second converter tree are not referenced by any other converter, setting the one or more physical pages to free; and
dropping the second snapshot.
|