Viewing 15 posts - 571 through 585 (of 1,825 total)
Because now , sqlserver can use an index.
the ltrim ( rtrim are stopping that from happening.
This is the difference between Sargable and Non-Sargable.
Using a function (there are a few exceptions)...
October 11, 2010 at 6:15 am
Are they doing the same quantity of physical reads ?
--EDIT, also go back to the developers / designers / third party provider and tell them that this is an unacceptable...
October 11, 2010 at 5:49 am
Try investigating the ranking functions.
http://www.sqlservercentral.com/articles/T-SQL/69717/
Count also supports the over clause.
October 11, 2010 at 5:13 am
So that gives you the tripid and the stopnumber of the duplicated data.
Why is that not what you need ?
October 11, 2010 at 4:58 am
The plans are the same 'shape' , there is a slight difference in the number of estimated rows (not much though).
The Difference in your io statistics you quoted
--old machine io...
October 11, 2010 at 4:45 am
Please post the execution plans as per
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
October 11, 2010 at 4:23 am
Hi ,
please see this article , essential reading imo
October 11, 2010 at 4:22 am
You do seem to of overcompilcated this somewhat, have you used the "having" clause before ?
select id,Stopnumber,count(*)
from tbl_Details
group by id,Stopnumber
having count(*) >1
October 11, 2010 at 4:20 am
Hi , Sorry i am not understanding your issue. Can you restate it ?
October 11, 2010 at 1:41 am
With proper indexing , it shouldnt be to bad
Alternatively comparing the min and max values can give you the same results
Create table BigTable
(
id integer identity,
RId integer not null
)
go
create index...
October 8, 2010 at 3:07 am
try using "count(*) over (partition by...."
October 8, 2010 at 2:41 am
Curious , since both queries include the non-sargable expression ltrim(rtrim(<value>)), both should result in then same , very poorly performing , execution plan.
Can you post both the plans ?
You may...
October 8, 2010 at 1:29 am
GPO (10/7/2010)
October 7, 2010 at 3:26 am
roelofsleroux (10/7/2010)
October 7, 2010 at 3:22 am
ALTER PROCEDURE [dbo].[uspListExecutionTransaction]
(@SessionKey UniqueIdentifier) AS BEGIN
SELECT * FROM EXECS.tblExecutionTransaction WHERE SessionKey = @SessionKey
END
Assuming that EXECS.tblExecutionTransaction is a table with an index on sessionkey, then caching of plans is exactly...
October 7, 2010 at 2:56 am
Viewing 15 posts - 571 through 585 (of 1,825 total)