arthurhsu / lovefield-ts

Lovefield TypeScript port: successor of google/lovefield
Apache License 2.0
47 stars 3 forks source link

Optimize DELETE ALL case #29

Open arthurhsu opened 1 year ago

arthurhsu commented 1 year ago

Deleting from a BTree index is a very heavy operation because it re-balances the tree as needed after every deletion. In the case of DELETE ALL, we should be simply dropping the entire index tree, instead of removing entries one-by-one.