Viewing 15 posts - 346 through 360 (of 430 total)
Michael Valentine Jones (6/17/2011)
Did you try adding indexes on the predicate columns?
Both the tables show seek operation on their indexes.Do you think anything would be missing? I thought seek is...
June 17, 2011 at 10:56 pm
GilaMonster (6/17/2011)
The Dixie Flatline (6/17/2011)
June 17, 2011 at 12:05 pm
GilaMonster (6/17/2011)
You don't need this predicate - b.UserString6 is not null - it's covered by the other one.
I had ran the query without this predicate too, but no change in...
June 17, 2011 at 7:44 am
Modified query and execution plan:
declare @p char(8);
set @p= convert(char(8),dateadd(dd, -45, getdate()),112)
select a.ProcessDate, a.BatchNo, b.UserString6 from [jbtms].DetailFile1 a Inner join
[jbtms].DetailFile2 b
on a.detailkey = b.detailkey
and a.dayofdate = b.dayofdate
where...
June 17, 2011 at 7:35 am
GilaMonster (6/17/2011)
He's suggesting replacing both predicates you have with the one he suggested. They are synonymous.
ok...i used the following in the where clause:
where b.UserString6 > ''
and a.ProcessDate >@p
but no gain...
June 17, 2011 at 7:26 am
stewartc-708166 (6/17/2011)
the UserString6 column is defined as VARCHAR(200)have you tried
and b.UserString6 > ''
b.userstring6 is being used twice:
where b.UserString6 is not null
and LTRIM(RTRIM(b.UserString6)) <> ''
which place exactly you are suggesting...
June 17, 2011 at 7:08 am
I have tried to modify few things. I tried to minimize the use of function in where clause and also made sure that the processeddate column which is defined as...
June 17, 2011 at 6:33 am
GilaMonster (6/17/2011)
What's the data type of a.ProcessDate?
Do you think i can do something else here?
June 17, 2011 at 4:27 am
John Mitchell-245523 (6/17/2011)
June 17, 2011 at 4:27 am
GilaMonster (6/17/2011)
What's the data type of a.ProcessDate?
Here is some sample data from DetailFile1 table for which table alias a is used:
ProcessDateBatchNo
201102050000200000
201102050000200000
201102050000200000
201102050000200000
201102050000200000
June 17, 2011 at 2:27 am
GilaMonster (6/17/2011)
What's the data type of a.ProcessDate?
its a char. i attached the ddl for 2 tables for reference.
June 17, 2011 at 2:19 am
LutzM (5/13/2011)
chandan_jha18 (5/13/2011)
Thanks. I started with backup and restores and then moved on high end DBA tasks. Gradually i started to read and understand t-sql but not on a...
May 13, 2011 at 1:06 pm
Ninja's_RGR'us (5/13/2011)
chandan_jha18 (5/13/2011)
Ninja's_RGR'us (5/13/2011)
You are right. Once you create that index, the optimizer will then use that one and possibly...
May 13, 2011 at 1:03 pm
Ninja's_RGR'us (5/13/2011)
You are right. Once you create that index, the optimizer will then use that one and possibly suggest a...
May 13, 2011 at 5:29 am
I really do not think that from DBA end anything can be done here. when its a poorly performing cursor, i am just suffocated.not sure where to go from here.
May 13, 2011 at 5:18 am
Viewing 15 posts - 346 through 360 (of 430 total)