Viewing 15 posts - 31 through 45 (of 1,824 total)
From a conceptual point of view think of this:
In a phone directory the clustered index is LastName,FirstName, Street Address.
That being the case how can the be a clustered index on...
December 29, 2012 at 2:36 am
I would be interested in seeing the plan for this ..
Select TradeID,DataSource.DataSourceID
FROM
dbo.Trade
INNER JOIN dbo.DataSource ON dbo.DataSource.DataSourceID=dbo.Trade.DataSourceID
WHERE
(...
December 20, 2012 at 8:28 am
Hmm, odd.
Im interested in this part of the plan
Which is pretty much the very first join between datasource and trade.
The estimate from the hash join is 1 ,...
December 20, 2012 at 7:02 am
GilaMonster (12/19/2012)
Dave Ballantyne (12/19/2012)
Update them , then run the queries again (using WITH RECOMPILE) and see what the plans look like.
No need to use recompile. The stats update alone would...
December 19, 2012 at 9:53 am
I think your statistics are out of date on that table.
Update them , then run the queries again (using WITH RECOMPILE) and see what the plans look like.
The estimations and...
December 19, 2012 at 9:28 am
The writes could be due to a memory spill
http://www.sqlpassion.at/blog/PermaLink,guid,2a24830a-5cf9-4438-96e9-af0a6d7372c3.aspx
In terms of what else *could* (pure guesswork 🙂 ) be happening here:
The "delay" may not even be in SQL Server,...
December 19, 2012 at 9:09 am
Essentially, the 2 queries are the same.
Fraid not ,
if a value is used multiple time in Indexing for Col2 then you will get "duplicate" rows back
select col2,count(*)
from indexing
group...
December 19, 2012 at 8:05 am
Have a look at the seek predicate for the DATE cast.
You will see that it has converted the predicate to a date range
ie
>= Date and < Date
So IMO...
December 19, 2012 at 7:29 am
Did you read those articles ?
Example 3 on the beyondrelational one is very close to what you require.
December 17, 2012 at 2:19 am
So this is in a WHERE clause ??
Assuming so, this is what is known as a non-sargable condition.
Basically, as you have wrapped the datetime column in a function...
December 17, 2012 at 12:20 am
Three seeks here,
Anyway the point is that the optimzer is now able to choose between a seek and scan not the developer 🙂
November 30, 2012 at 3:44 am
dilipd006 (11/29/2012)
Eugene Elutin (11/29/2012)
Try this:
SELECT S.CityId, C.Name
FROM @City AS S
CROSS APPLY (VALUES (CityName),(AlternateCityName1),(AlternateCityName2)) C(Name)
WHERE C.Name LIKE @SearchString + '%'
Thanks Eugene..never known we can use Cross Apply in this...
November 29, 2012 at 11:59 pm
Using uncommitted/nolock may well 'fix' the problem but please understand that you will be reading dirty data.
If the transaction is to be rolled back then what does that be for...
November 28, 2012 at 4:39 am
Can you post both of the new plans ?
November 28, 2012 at 3:32 am
Viewing 15 posts - 31 through 45 (of 1,824 total)