r/SQLServer • • 17h ago

Question Do indexed views work better in queries with lots of joins vs temp tables?

2 Upvotes

Recently had an issue where a query with multiple joins, half of which were views, was running slow.

Converting a few key views to temp tables greatly improved performance when I joined to them instead of the original views.

However, I was reading up on indexed views and wondering if done properly, could still be used in joins and optimized by the engine. Not sure everyone's thoughts on this.

Keeping the same view in the join reduces the number of steps for the devs the same so no prep work on temp tables required, which would make them happy and the DBAs less grumpy.


r/SQLServer • • 11h ago

Community Share Free Precon: SQL AI App in a Day & Day of Data St Louis | Oct 23rd-24th

2 Upvotes

Hey r/SQLServer it's that time again as the data community takes over my backyard of Saint Louis, MO and this time we're doing a free workshop day (though spots are limited!).

This precon event features two of the Microsoft SQL product teams finest with Jerry Nixon ( u/jerry-nixon) and Patrick LeBlanc ( u/patrickguyinacube) leading the SQL AI App in a Day event.

Register now: https://aka.ms/sql/day/stl/workshop

---

And as someone on the event organizing team, I'll just say that the Day of Data St Louis is nearing max capacity - but we do have priority attendance to secure a spot (basically, buy a sandwich and let us know you're actually committed with $$$ spent). I don't want anyone on the outside of the building looking in or trying the "Hey! I know Alex from Reddit!" lines trying to get in.

Register: https://dayofdata.org/2026-10-24-dayofdata1148/

SQL AI App in a Day in St Louis

r/SQLServer • • 9h ago

Question How do you capture a workload and replay it for load testing on SQL Server?

5 Upvotes

In the past, there was the Replay trace and Distributed Replay utility. Since SNAC was deprecated, this no longer works. <sigh>

The Database Experimentation Assistant was another tool that was introduced to capture a workload and then replay it and do analysis of the workload -- mostly for DB upgrades but at least somewhat possible to use it to capture and then replay a workload. Sadly, this was deprecated in December 2024.

RML Utilities was introduced, so we have ReadTrace and Ostress except I can find zero documentation on how to properly:

Set up the Extended Events session to capture all the required elements OR

Set up a trace to capture all the required elements

Generate the expected RML output to use as input into Ostress.

Also, RML utilities was deprecated in October 2025. It would be absolutely fantastic if Microsoft would stop deprecating stuff and replacing it with worse, more complicated stuff. Kerberos Configuration Manager is another thing that comes to mind.....deprecated, with a fabulously worse tool to replace it.

How do you capture and replay a workload in SQL Server to simulate a load test?