Skip to content

feat: optimize DELETE without WHERE filter

Emir Vildanov requested to merge vildanov/831-optimize-delete into main

Summarize the changes

Optimize DELETE without WHERE filter

Previously all DELETE operations were executed via space api. Primary keys were materialized and passed tuple by tuple to the delete function. Under Delete node we always put a Motion with policy Local to materialize tuples to delete.

This commit brings an optimization for the case of DELETE without WHERE condition. Such queries are translated into local SQL and don't require tuples materialization from target relation (from which we delete). We don't add a Motion node under Delete in such cases.

Closes #831 (closed).

Ensure that

  • New code is covered by unit and integration tests.
  • Related issues would be automatically closed with gitlab's closing pattern (Closes #issue_number).
  • Public modules are documented (check the rendered version with cargo doc --open).
  • (if PEST grammar has changed) EBNF grammar reflects these changes (check the result with railroad diagram generator.

Next steps

Edited by Emir Vildanov

Merge request reports