Viewing 15 posts - 16,981 through 16,995 (of 22,219 total)
Yeah, you're making sense, apparently I'm not.
I didn't mean that the child table would have those values, instead it has the FK to the PK of the parent, right?...
"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 17, 2009 at 5:57 am
You might try changing the order of the table definitions. I know everyone says that doesn't make a difference, but what they mean is, it doesn't normally make a difference....
"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 17, 2009 at 5:42 am
yeah, it shouldn't be an issue.
Let's assume your data looks something like this:
Columns in Table 1:
ParentID KeyVal1 KeyVal2 Some Data
Columns...
"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 16, 2009 at 8:57 pm
TheSQLGuru (7/16/2009)
"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 16, 2009 at 12:33 pm
zach_john (7/16/2009)
SELECT Top 1 @ContainerUUID=ContainerUUID
from CM_VENDOR_CONTAINER(NOLOCK)
where IsNULL(VENDorContainername,'')=IsNULL(@VENDorContainerName,'')
And IsNULL(VENDorContainerID,'')=IsNULL(@VENDorContainerID,'')
And FileUUID=@FileUUID
CREATE TABLE [dbo].[CM_VENDOR_CONTAINER](
[ContainerUUID] [uniqueidentifier]...
"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 16, 2009 at 11:44 am
GilaMonster (7/16/2009)
Nope. Noncluster. This was SQL 2000.
Hint:
SELECT count(*) FROM sysindexes WHERE id = OBJECT_ID('TableInQuestion') AND name LIKE '_WA_SYS%'
Ah.... Cool. I hadn't thought of 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
July 16, 2009 at 11:30 am
GilaMonster (7/16/2009)
"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 16, 2009 at 10:42 am
Jeff Moden (7/16/2009)
Think "parameter sniffing" to determine how far you'd carry the approach and when you can least afford for it to occur.
Yes, true. But there's good & bad to...
"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 16, 2009 at 10:32 am
TheSQLGuru (7/16/2009)
I think we will have to disagree on this one. I estimate that 90+% of the time a user has a query with a date range comparison to...
"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 16, 2009 at 9:30 am
I don't know that I'd recommend recompiling out of hand. The execution plan using a parameter is going to sample the appropriate indexes and arrive at a generic "best" plan....
"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 16, 2009 at 8:38 am
Jeff Moden (7/16/2009)
Could it be that the problem is being caused by non-deterministic functions?
Yeah, that's basically it, but it's hard to tell someone exactly why one function turns out like...
"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 16, 2009 at 8:23 am
I would strongly recommend you use the OUTPUT clause instead of triggers. Not least because, i think, you won't have access to the identity values inside the trigger.
OUTPUT is pretty...
"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 16, 2009 at 8:06 am
Most of the time, when I'm observing client statements in trace events, I see the parameter values on stored procedure calls. And if I run a batch that looks like...
"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 16, 2009 at 7:56 am
I'd add a step to design the clustered indexes. They should be part of the fundamental decisions around the database design.
"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 16, 2009 at 7:44 am
They're not visible in the textdata column?
"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 16, 2009 at 7:43 am
Viewing 15 posts - 16,981 through 16,995 (of 22,219 total)