Skip to content

Commit

Permalink
Performance improvements for SSMS query while trying to expand stored…
Browse files Browse the repository at this point in the history
… procedures (#1923)

Currently, the SSMS query to expand stored procedures is found to be very slow (~ 6 hours for 1000 procedures).
The bad performance is found to be majorly occurring from sys.all_objects view. So, the following modifications have
been done to the sys.all_objects :

Bad row estimation arising due to the is_ms_shipped column in sys.all_objects view. This change fixes it by pushing
down the computation of is_ms_shipped column to the respective unions.

Made the datatype of type and name column consistent and removed the outer CAST as we are already casting them in
the respective UNIONs.

Removed subqueries and replaced them with suitable JOINs for better query planning.

Task: BABEL-4008
Signed-off-by: Sai Rohan Basa <[email protected]>
  • Loading branch information
basasairohan authored Oct 25, 2023
1 parent 3fb85f5 commit 64d91ac
Show file tree
Hide file tree
Showing 2 changed files with 628 additions and 55 deletions.
Loading

0 comments on commit 64d91ac

Please sign in to comment.