Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark table_constraints_internal() function as parallel safe and set c…
…urrent_db_id for parallel workers (#3321) The INFORMATION_SCHEMA_TSQL.TABLE_CONSTRAINTS_INTERNAL() function was recently introduced but not marked as PARALLEL SAFE. This prevented the query optimizer from utilizing parallel plans in queries involving this function, leading to suboptimal performance for certain operations. By marking the function as PARALLEL SAFE, we enable the use of parallel query execution plans, which can significantly improve performance for large datasets. This commit also addresses the issue of empty result sets in queries joining with sys.db_id() or sys.db_name() in Enforced Parallel Query mode by setting the current_db_id in addition to current_db_name for parallel workers. Task: BABEL-5427, BABEL-5504 Signed-off-by: Sumit Jaiswal [email protected]
- Loading branch information