Viewing 14 posts - 8,401 through 8,414 (of 8,414 total)
...and a further quick word on the evil that is string keys.
Not only are they much more work to compare on than integer keys, but the comparison depends on collation...
April 2, 2009 at 9:07 pm
Bruce W Cassidy (4/2/2009)I could argue some of your points, btw (having re-read them.) But I think that would be side-tracking the point of this discussion.
[/font]
Hi Bruce,
Sure. I...
April 2, 2009 at 7:29 pm
Bruce,
I just wanted to add that a cluster key on an identity column is not without issues:
1. While it can help keep clustered index fragmentation down, this is not...
April 2, 2009 at 5:17 pm
Hi bhushanvinay,
While I have no doubt that the scheme you outline would work, I imagine it would be a nightmare on a busy system. That's true even if the...
April 2, 2009 at 5:04 pm
Hi,
I can't see anything obviously problematic there. Could you possibly re-post the script for the view directly from SSMS (with the alias for count_big(*) for example) so we be...
April 2, 2009 at 3:32 pm
Hi James,
Thanks! 🙂
If the SQL is difficult to change (maybe because it is generated by a third-party application or whatever), you may still be able to produce a better outcome...
April 2, 2009 at 1:49 pm
Hey Grant,
You might well be right - the first query does do more logical IO, but that's not the whole story. If the whole table is scanned in allocation...
April 2, 2009 at 5:53 am
Hi again Gail,
Sure. Everything you say is true. The only thing I would say (in a small voice) is that my previous comments were 'off the top of...
April 2, 2009 at 5:31 am
One other possibility if you really need to go down this road:
CREATE TABLE dbo.IDs
(
ApplicationName VARCHAR(30) PRIMARY KEY CLUSTERED,
Counter INT NOT NULL
)
-- If more than one counter is required...
INSERT dbo.Ids...
April 2, 2009 at 3:57 am
Unless I am missing something there?
Basically what it means is that the scan count can't be trusted as not all operators set it in the same way.[/quote]
I'm inclined to agree...
April 2, 2009 at 2:59 am
Hi!
I've just looked at the connect article and MS seem to have closed it as 'by design'.
My understanding is that a 'seek' always selects one row (either by key or...
April 2, 2009 at 2:27 am
Hi,
You might also like to consider adding two INT columns to hold CHECKSUMs of the Questions and Answers.
The CHECKSUMs can act as a hash value to allow a future query...
April 2, 2009 at 2:15 am
Hi,
In order to decide which is the 'better' query, we would need to know what defines 'best' for you:
1. Logical IO
2. CPU
3. Concurrency
4. Response time
5. ...
April 1, 2009 at 10:19 pm
Hi,
When you introduce the ORDER BY, the query optimizer (QO) picks a bad plan. This often happens with TVFs, queries from remote servers, XQuery expressions and so on because...
April 1, 2009 at 9:58 pm
Viewing 14 posts - 8,401 through 8,414 (of 8,414 total)