Viewing 15 posts - 20,011 through 20,025 (of 22,224 total)
I sure don't mean to start a fight with my next statement....
Please don't do that. Learn to use the ANSI joins. There are a ton of good reasons. I'll give...
"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 10, 2008 at 11:26 am
Hmmm... I just ran the test and received no difference between truncate and delete.
"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 10, 2008 at 8:47 am
I think you're looking for something like this:
select c.date
from spdqty as c
inner join (select date, vialsOUT from spdqty) as a
on c.date = a.date
inner join (select date, vialsIN from spdqty)...
"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 10, 2008 at 8:28 am
So, you've got two tables that have three different and distinct relationships between the tables? I'm pretty sure that violates one of the rules of normalization, but I'm not sure...
"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 10, 2008 at 7:40 am
160gb is not small, but I've used Profiler (in a limited fashion) back in 7.0 on 300gb databases. That was before the improvements to the tool in 2000. You should...
"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 10, 2008 at 7:17 am
From my own experience and everything I've read, no, the order doesn't change the selectivity. It will affect sorting speed. If you need to retreive the data in a particular...
"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 10, 2008 at 6:44 am
The data in an insert trigger is contained in a set called INSERTED that you can treat just like a table. So if you wanted to capture the data all...
"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 10, 2008 at 6:35 am
You would have to use a user defined function as Chirag mentions above. Doing that in the where clause is pretty likely to lead to RBAR (row-by-agonizing-row) processing, which kills...
"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 10, 2008 at 6:31 am
If you limit the events captured to only what you really need (especially staying away from capturing individual statements) and you use the extended stored procedures to fire off Profiler...
"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 10, 2008 at 6:26 am
A bit of both really. Plus, if you haven't been here, you might not know. This place is kind of big. There's a lot of empty space and we tend...
"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 9, 2008 at 9:35 am
It really depends on where you're driving to as well as the distance. I used to commute about 30 miles down I-90, the Massachusetts Turnpike, and it took about 1...
"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 9, 2008 at 9:30 am
We have very similar requirements. We do it like this:
SELECT...
FROM MyTable m
WHERE m.VersionId = (SELECT TOP(1) m2.VersionId
...
"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 9, 2008 at 7:10 am
Brian Tax (7/8/2008)
"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 9, 2008 at 6:26 am
How come you don't need to add the scalar operator, '0 [Basic]', to the * version of the query? If you did add that, would it change the execution time?
Jeff...
"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 8, 2008 at 1:13 pm
I'd need to see the execution plans to be sure, but I'll be you're getting index lookups for the column list, but not for the SELECT *. Can you post...
"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 8, 2008 at 12:04 pm
Viewing 15 posts - 20,011 through 20,025 (of 22,224 total)