New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document SQL fast paths #3511
Comments
CC @rmloveland this will be a late add (and priority for 2.1 in particular) due to work @emsal1863 has done to make a fast path for interleave deletes for customers like C and others. His work is close to merging but there are a few other fast paths that are useful to document at the same time |
@emsal1863 do you have a link to an example of such a query or queries? (for example in tests attached to a code PR?) |
Looks like cockroachdb/cockroach#28330 |
@emsal1863, can you please write out an example for each fastpath and how to activate it? |
Interleaved fast path (cockroachdb/cockroach#28330) This fast path is triggered when issuing a DELETE statement on a table with interleaved tables that all have ON DELETE CASCADE clauses, have no secondary indices, and aren't foreign key-referenced by any other table. The path is not taken when there is any RETURNING claus in the delete query. When triggered, the delete operation will skip the expensive foreign key check operations, instead opting for using KV The performance boost from using this fast path is several orders of magnitude, potentially going from second-scale to sub-nanosecond scale. |
Addresses #3511. Summary of changes: - Update 'INTERLEAVE IN PARENT' page with: - Some new paragraphs in the **Benefits** explaining fast path deletes - A new example in the **Examples** section - A reference to the above from the **Tradeoffs** section - (Unrelated) Some `div` tags to fix a broken diagram
Addresses #3511. Summary of changes: - Update 'INTERLEAVE IN PARENT' page with: - Some new paragraphs in the **Benefits** explaining fast path deletes - A new example in the **Examples** section - A reference to the above from the **Tradeoffs** section - (Unrelated) Add `div` tags to fix a broken diagram
Addresses #3511. Summary of changes: - Update 'INTERLEAVE IN PARENT' page with: - Some new paragraphs in the **Benefits** explaining fast path deletes - A new example in the **Examples** section - A reference to the above from the **Tradeoffs** section - (Unrelated) Add `div` tags to fix a broken diagram
Addresses #3511. Summary of changes: - Update 'INTERLEAVE IN PARENT' page with: - Some new paragraphs in the **Benefits** explaining fast path deletes - A new example in the **Examples** section - A reference to the above from the **Tradeoffs** section - (Unrelated) Add `div` tags to fix a broken diagram
Addresses #3511. Summary of changes: - Update 'INTERLEAVE IN PARENT' page with: - Some new paragraphs in the **Benefits** explaining fast path deletes - A new example in the **Examples** section - A reference to the above from the **Tradeoffs** section - (Unrelated) Add `div` tags to fix a broken diagram
Addresses #3511. Summary of changes: - Update 'INTERLEAVE IN PARENT' page with: - Some new paragraphs in the **Benefits** explaining fast path deletes - A new example in the **Examples** section - A reference to the above from the **Tradeoffs** section - (Unrelated) Add `div` tags to fix a broken diagram
@rmloveland, what's left here after #3834? |
@knz I recall that there are some other fast paths that you created diagrams for. Are the other fast path operations in a state that we would want to document them at this time? |
@BramGruneir or @knz : can this issue be closed now that fast path deletes are documented? I recall that there are some other fast paths, but IIRC we do not want to document the others yet. Is that correct? |
Yep, I say close it. |
There are a number of conditions that trigger fast paths during execution that are faster than the normal operation. For example, if rows can be deleted without actually having to scan them, then cockroach will undergo an alternative 'fast delete'. (see
canDeleteFast
andfastDelete
indelete.go
)Documenting these fast paths is important to users so they can know in what ways they can boost the performance of their queries.
The text was updated successfully, but these errors were encountered: