Forum Replies Created

Viewing 15 posts - 6,406 through 6,420 (of 8,416 total)

  • RE: Complicated grouping data

    Right. It took a fair amount of work to get to see the plans there, but I now see what you mean.

    The APPLY version is much less efficient than...

  • RE: Execution of DISTINCT Clause

    About the 'internals'...

    The first thing to realize is that the trick of generating a comma separated string using multiple assignments takes advantage of an undocumented quirk in SQL Server. ...

  • RE: selecting TOP row from a result set

    Welsh Corgi


    This is a great example but what if:

    Welsh Corgi


    ...the employee table had duplicate entries.

    Use a CTE or derived table in place of the Employee table. A DISTINCT or...

  • RE: Are the posted questions getting worse?

    On the toll-call proposal: I think it is important we remember whose idea it was and direct any royalty payments appropriately :laugh:

  • RE: Complicated Query Help (for a relative beginner)

    nguyennd (1/11/2010)


    Why don't use SELF JOIN in this case? Is it simple than outer apply?

    Why don't you try both and let us know what differences you find?

    It is certainly possible...

  • RE: Complicated grouping data

    I assume the percentage figures you quote are the cost % of the batch? I don't generally attach much value to those percentages, but it'd be great to see...

  • RE: Coincidence or Causality

    Tom.Thomson (1/10/2010)


    Steve Jones - Editor (12/13/2009)


    Deadlocks don't occur within a query, they are within a transaction when you are updating two objects.

    They can't in theory occur within a transaction, they...

  • RE: Complicated Query Help (for a relative beginner)

    Mitch,

    The code I posted was to demonstrate technique - it was not intended as a complete solution.

    To be fair, I think you could easily have found the solution for yourself...

  • RE: keyset cursors

    It's not always about the performance of one query.

    Quite frequently, concurrency is more important, in which case a cursor is a fine choice.

  • RE: need help with parsing string

    A quick-and-dirty solution is to just add an extra period to each string during processing. Your script then runs without modification:

    DECLARE @data TABLE (data VARCHAR(50) NOT NULL);

    INSERT @data (data)...

  • RE: selecting TOP row from a result set

    Here's one way of obtaining the sort of results you seem to be after. It is based on data in the AdventureWorks sample database.

    SELECT TOP (10)

    ...

  • RE: Doubt about CURSORS....!!!!!!!!!

    The internal worktable created to hold a copy of the rows is not a normal temporary table and can't be accessed by users.

  • RE: memory in 64 bit when idling

    repent_kog_is_near (1/9/2010)


    Will the buffer pool be allocated and unused? in the scenario of the Ent Edition and the other factors?

    Normally, yes - but only in the circumstances I described....

  • RE: Are the posted questions getting worse?

    Alvin Ramard (1/9/2010)


    Hey, that gave me an idea. Maybe we should all add our phone numbers to our signature.

    Indeed. i was thinking of an 0900 number that charges...

  • RE: Are the posted questions getting worse?

    CirquedeSQLeil (1/9/2010)


    That is extremely annoying. Some PMs and some emails is one thing - but then to go to the next medium. If it is somebody I know,...

Viewing 15 posts - 6,406 through 6,420 (of 8,416 total)