Viewing 15 posts - 14,506 through 14,520 (of 22,232 total)
GilaMonster (8/10/2010)
Grant Fritchey (8/10/2010)
"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
August 10, 2010 at 12:37 pm
Well, that "solution" is pretty dangerous. You just forced every query to go through a recompile, which can be pretty costly, depending on the query. It's likely that you're experiencing...
"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
August 10, 2010 at 12:33 pm
GilaMonster (8/10/2010)
Megistal (8/10/2010)
If that...
"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
August 10, 2010 at 12:25 pm
I think you're assuming that SQL Server would move all the pages in the clustered index if a split occurs. It wouldn't. It would only move the information on the...
"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
August 10, 2010 at 12:23 pm
What business need is being satisfied by pulling all the data? Users do not look at anything past a few hundred rows in general. If you're looking at data migration,...
"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
August 10, 2010 at 11:51 am
You'll still possibly end up with page splits in the nonclustered index AND you'll be dealing with the fact that your structure isn't taking advantage of a good clustered index....
"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
August 10, 2010 at 11:48 am
Excellent Jonathan. Thanks.
"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
August 10, 2010 at 7:54 am
The execution plan stores all the information of what is accessed. This information is stored as XML. So you can run an XML query against the execution plan to return...
"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
August 10, 2010 at 7:20 am
email-935809 (8/10/2010)
"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
August 10, 2010 at 7:07 am
Probably would have worked with ISNULL too, but COALESCE came into my head first.
"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
August 10, 2010 at 6:49 am
You've got a query that is selecting everything from the client table to insert into the client table... I'd figure out who was doing that right away if it were...
"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
August 10, 2010 at 6:46 am
On fairly simple queries the order of tables in the WHERE clause usually doesn't affect performance or the plan generated in any way. As queries get more complicated the order...
"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
August 10, 2010 at 6:45 am
Looks OK to me. Are you getting an error? If so, what is it?
"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
August 10, 2010 at 6:27 am
Not directly and not easily.
What you can do is an XQuery against the queries in cache to see which have accessed a given index, but the read values of the...
"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
August 10, 2010 at 6:25 am
I think this does what you need.
--test table
CREATE TABLE OrderTest
(id INT,
parentid INT NULL)
--test data
INSERT INTO OrderTest
VALUES
(1, NULL),
(2, NULL),
(3, NULL),
(4, 1),
(5, 1),
(6, 2),
(7, 2),
(8, 3),
(9, 3)
--query
SELECT *
FROM OrderTest
ORDER BY COALESCE(ParentId,Id),...
"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
August 10, 2010 at 6:22 am
Viewing 15 posts - 14,506 through 14,520 (of 22,232 total)