Descriptions of the various options for temporary storage of data while learning TSQL. At the end of learning about temporary storage, some ideas on the best uses of MERGE are available.
Descriptions of the various options for temporary storage of data while learning TSQL. At the end of learning about temporary storage, some ideas on the best uses of MERGE are available.
Descriptions of the various options for temporary storage of data while learning TSQL. At the end of learning about temporary storage, some ideas on the best uses of MERGE are available.
Cascading data changes, recursive queries, and other queries Who is Richard Mathis
CTO of CHSI Technologies
Designed and Implemented databases since 1999. Professed all things but especially data geek Min-maxer, constantly looking for the best new thing to eke out 1-2% more performance. Course Objectives
Improve performance by reusing expensive queries
Create hierarchal resultsets Store or build temporary data Using MERGE instead of UPDATE Synchronize data with MERGE Cascading INSERT/UPDATE Statements Queries inside Queries Separate queries for readability Use the output of an expensive query multiple times for performance Queries Joined on Themselves Create queries that create a dynamic amount of children rows Hierarchal parent-child-child-etc relationships Temporary Storage For our purpose, were going to avoid #Tables. If in doubt, try to use in the order CTE, Table Variable, #Table These constructs can both help and hurt database and query performance. MERGE
Looks complicated, but
very explicit Somewhat handles race conditions, but still needs HOLDLOCK MERGE from Parent to Child to Child
Often changes at a top level should
extend to all of their related tables. In many scenarios, can be reran without creating duplicates. Questions
THE STEP BY STEP GUIDE FOR SUCCESSFUL IMPLEMENTATION OF DATA LAKE-LAKEHOUSE-DATA WAREHOUSE: "THE STEP BY STEP GUIDE FOR SUCCESSFUL IMPLEMENTATION OF DATA LAKE-LAKEHOUSE-DATA WAREHOUSE"