-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
49126: opt: improve the rule that converts COUNT to COUNT_ROWS r=RaduBerinde a=RaduBerinde Improve the ConvertCountToCountRows rule to check for any scalar expression that is never null, not just bare variable references. Release note (performance improvement): `COUNT` is now converted to `COUNT(*)` (aka `COUNT_ROWS`) in more cases. 49163: opt: move interleaved fast delete logic to the optimizer r=RaduBerinde a=RaduBerinde #### sql: move delete fast path tests to logictests Rewrite the interleaved fast path tests as logic/execbuilder tests, so that they continue to work when the fast path is reimplemented in the optimizer. Release note: None #### opt: move interleaved fast delete logic to the optimizer DeleteRange is used as a fast path for delete when it is safe to simply delete an entire range of keys. There are two separate paths, depending if the table has interleaved children. The non-interleaved path is implemented in the optimizer, but the interleaved path is legacy code called from the exec factory. This change moves the interleaved fast path to the optimizer. This is necessary to allow use of the fast path when opt-driven cascades are enabled. The conditions for using DeleteRange on an interleaving are quite strict - there must be foreign key with ON DELETE cascade set up for all tables in the interleaving. The existing path did not check the columns of the foreign keys; in principle we could set up foreign keys between the expected tables but on columns that don't match the interleaving. This is not a problem in practice right now because any of those cases would result in secondary indexes, which prevent the fast path regardless. But this won't be the case once we relax the index requirements, so the new path checks the columns as well. Release note: None Co-authored-by: Radu Berinde <[email protected]>
- Loading branch information
Showing
14 changed files
with
594 additions
and
488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.