Forum Replies Created

Viewing 14 posts - 8,401 through 8,414 (of 8,414 total)

  • RE: table relationship

    ...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...

  • RE: table relationship

    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...

  • RE: table relationship

    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...

  • RE: Is this a good way to approach the partitioning.

    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...

  • RE: Indexes on views

    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...

  • RE: Why would the use of COALESCE on an INNER JOIN result in faster execution?

    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...

  • RE: IO Statistics

    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...

  • RE: IO Statistics

    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...

  • RE: Users are blocked when access same row using XLOCK

    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...

  • RE: IO Statistics

    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...

  • RE: IO Statistics

    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...

  • RE: Long running queries when using DISTINCT with Strings

    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...

  • RE: IO Statistics

    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. ...

  • RE: Why would the use of COALESCE on an INNER JOIN result in faster execution?

    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...

Viewing 14 posts - 8,401 through 8,414 (of 8,414 total)