Viewing 15 posts - 1,741 through 1,755 (of 22,227 total)
And to see what indexes are being used and how they're being used, you want to look at the Execution Plans. The book in my link is available in digital...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 1, 2020 at 12:06 pm
If you could zip the execution plan and post it instead of the picture, we might be able to help. All the good stuff on an execution plan is in...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 1, 2020 at 12:05 pm
Your function is a table, not a value. You're trying to compare a value, e.ID, to a table. You can't do that. You can join to your table instead, but...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 1, 2020 at 11:59 am
The actual plan shows the number of threads used. Counting worker threads you're seeing other artifacts from other processes, including system processes. MAXDOP limits the number of concurrent processors used...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 1, 2020 at 11:55 am
Index use depends on the amount of data it's going to filter. Take a look at the estimated number of rows each time it's doing a scan. I'll bet you...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 26, 2020 at 12:05 pm
Since a view is a definition of a query, but is not the actual query that is run when the view is accessed, tuning a view is quite difficult. For...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 26, 2020 at 11:46 am
There is an Oracle specific forum. It might have people monitoring it who know more about Oracle.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 26, 2020 at 11:39 am
So, you have 500 rows. You're adding them all with GETDATE(), then your filtering based on the todays date? Right? You realize that all 500 rows are going to have...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 26, 2020 at 11:32 am
If you're running SQL Server 2017, Query Store is your bestest friend in the world. Enable Query Store, You'll be able to look at a given query and see how...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 25, 2020 at 11:54 am
If you're by yourself on the server and you've recently had the database open in the Object Explorer in SSMS, say looking at tables or something, in addition to changing...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 25, 2020 at 11:52 am
Without seeing the execution plan, the indexes and the statistics, I only have guesses.
Row estimates are off. That usually points to statistics. I know you've said you've updated them, but...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 25, 2020 at 11:48 am
I'd use NOT EXISTS probably
SELECT e.EmployeeNo
FROM dbo.Employees AS e
WHERE NOT EXISTS(
SELECT sl.SalaryLevelID
FROM dbo.SalaryLevel AS sl
WHERE sl.SalaryLevelID = e.SalaryLevelID);
There are other ways as well. An outer join & filter on NULL...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 25, 2020 at 11:40 am
Thanks for taking on all the good comments everyone. I was away for a bit.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 24, 2020 at 1:54 pm
Phil suggested DevOps, which I heartily, vociferously, and vigorously agree with.
For some reason it was marked as Spam. I unmarked it.
I'll add PowerShell. Automate all the things.
Also, you said tuning,...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 24, 2020 at 10:32 am
The Blocked Process Report is an event within SQL Server. That's what you're setting the threshold for. You can read about it here. And yes, some monitoring tools use...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 24, 2020 at 10:29 am
Viewing 15 posts - 1,741 through 1,755 (of 22,227 total)