Forum Replies Created

Viewing 15 posts - 5,986 through 6,000 (of 8,416 total)

  • RE: CPU time drops, but elapsed time increases

    Sander A. (2/21/2010)


    There is a big change we will do that in the near future. My boss wants every query to run within several seconds...... and I have no idea...

  • RE: Querying XML

    GSquared (2/19/2010)


    You'll need to use your column name instead of the XML variable, but it should do what you want.

    A much more efficient query plan is produced from this code:

    DECLARE...

  • RE: CPU time drops, but elapsed time increases

    I would need to sit down with you for several hours to give that query and plan the discussion it deserves 😉

    Nevertheless:

    1. In your original post, you said the...

  • RE: UNION a series of TOP statements

    The ROW_NUMBER() method will often be the fastest available, and a very consistent performer, but there are cases where a query based on an APPLY might be faster still. ...

  • RE: Multiple Log File for High Log Writes Wait

    You could also look into why the SQL Server is generating so much log activity. There might be a quick win there.

    In an ideal world, the DBA would just...

  • RE: SQL Random selection with NewID()

    SELECT TOP (10)

    MIN[QuestionID],

    [Title],

    ...

  • RE: SQL Server 2005 Log File Affinity

    The question of why there was a delay can be answered by considering the internal structure of log files.

    Books Online has an excellent description of it:

    Transaction Log Physical Architecture

    Transaction Log...

  • RE: SQL Server local variables

    It does seem like an unusual way to copy stuff around - replication springs to mind as an alternative.

    Nevertheless, given that the code exists, and you just need a way...

  • RE: Quering data from same table

    That's nice code Chris. It represents a nice compromise between the benefits of an indexed view, and the drawbacks related to the maintenance of aggregates for that view. ...

  • RE: nullable foreign keys for all primary keys

    Hello again,

    It's a lot more difficult for people like me, who know nothing about your data, to understand what you mean, even with that longer explanation.

    Maybe I'm just not very...

  • RE: High plan count on query without literal values

    chris.nilsson (2/21/2010)


    Thanks Paul:

    It is ad-hoc--it comes in as a query passed in from the web front end, rather than as a stored proc or the like.

    I will try...

  • RE: Help- Very Complex SQL query

    ChrisM@home (2/21/2010)


    Blimey, what was I thinking? :blush: Of course it works like this, it would be inconsistent for it to work any other way. I guess I got "confined" by...

  • RE: EXISTS

    BSavoie (2/21/2010)


    Thanks for the tip on posting code! THAT makes quite a difference!! 😀

    No worries! It's a small thing, but helps a lot, yes.

    BSavoie (2/21/2010)


    So below is...

  • RE: CPU time drops, but elapsed time increases

    None of the replies so far explain the increase in worktable reads.

    Personally, I doubt the query is disk-bound; it is more likely that the rewrite introduced a spool of some...

  • RE: Help with Cursor

    RBarryYoung (2/20/2010)


    Also there's no Primary Key on InventReorder.

    Do we need one? If so, ([Location], [PartNumber]) seems like a candidate.

Viewing 15 posts - 5,986 through 6,000 (of 8,416 total)