Mehdi Akiki

Posts tagged "vacuum"

  • Published on

    Investigation · Part 9 of 10 · Inside a database index

    Deleted Rows Do Not Shrink the File: Free Pages and VACUUM

    I deleted half of a SQLite table and the file kept exactly the same size. The table gave its pages to a freelist, the index stayed half empty, and new rows used the holes. VACUUM fixed everything in 0.4 s, but it wrote three times the size of the result to do it.