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 (#1956)

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 occuring 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.

Issues Resolved
BABEL-4008

Signed-off-by: Sai Rohan Basa [email protected]
  • Loading branch information
basasairohan authored Oct 27, 2023
1 parent 69438c7 commit 83bccd3
Show file tree
Hide file tree
Showing 2 changed files with 628 additions and 55 deletions.
Loading

0 comments on commit 83bccd3

Please sign in to comment.