Viewing 15 posts - 16 through 30 (of 1,081 total)
would it be worth trying to add a non-clustered index to the temp table to try and get ride of the key lookup?
July 14, 2009 at 2:03 am
where did you hear that from?
It is true that you can hinder the perform of an update by having to many indexes on a table as you will be updating...
July 13, 2009 at 9:56 am
Well they mena completely different things
what values are stored in that column? Do you store nulls or do you store the text 'null'?
July 13, 2009 at 8:31 am
are you sure this is what you want?
select count(*) from AuditData where TATCallType = 'null'
And not
select count(*) from AuditData where TATCallType is null
July 13, 2009 at 8:23 am
From your last spreadsheet we can see there is a clustered index being used.
I'm going to say that creating a non-clustered index covering you where clause and your selet output...
July 13, 2009 at 7:40 am
you could also post all the indexes on your table.
I have a feeling you have a clustered index on that table that you haven't mentioned yet.
I also have a feeling...
July 13, 2009 at 7:36 am
OK so now we getting somewhere.
what indexes do you have on the table you inserting into?
Also do you have any triggers on that table.
I would also take note of Dave's...
July 13, 2009 at 6:31 am
Here is another solution.
This is based on two thing.
1 - Columns are not if not being used.
2 - The number of columns is known.
SELECT
Col0,
COALESCE(Col1,Col2,Col3,Col4,Col5)
FROM @MyTable
July 13, 2009 at 6:24 am
I'm unclear, on why it needs to be dynamic?
are you saying that you never know how many columns there are in the table?
Secondly why is your table constructed this way.
Could...
July 13, 2009 at 6:21 am
how long does the actuall select part of you query take without the insert?
I can't really read that plan so I'm not sure what the stats are on the...
July 13, 2009 at 6:12 am
Is this the kind of thing you looking for?
DECLARE @MyTable TABLE
([col0] CHAR(1),
[col1] CHAR(2),
[col2] CHAR(2),
[col3] CHAR(2),
[col4] CHAR(2),
[col5] CHAR(2))
INSERT INTO @MyTable
SELECT 'a','xa',null,null,null,null UNION ALL
SELECT 'b',null,'xb',null,null,null UNION ALL
SELECT 'c',null,null,'xc',null,null UNION ALL
SELECT 'd',null,null,null,'xd',null...
July 13, 2009 at 5:57 am
could you post the actual execution plan, as a *.sqlplan zipped up and attached to the job.
Could you also give me a little break down what you trying to return...
July 13, 2009 at 5:50 am
Viewing 15 posts - 16 through 30 (of 1,081 total)