Forum Replies Created

Viewing 15 posts - 2,581 through 2,595 (of 2,610 total)

  • RE: Cursors Be Gone!

    Matt Whitfield (12/24/2008)


    Having modified that script a bit, and run it on my server - the time was 23.078 secs. Improved, certainly, but not better.

    SET NOCOUNT ON

    declare @query varchar(100), @id...

  • RE: Cursors Be Gone!

    Jeff Moden (12/24/2008)


    Good idea, Gaby, and good article...

    Could you list one thing that's a good idea in this article, spelling mistakes aside?

  • RE: Cursors Be Gone!

    A bit of an odd example to pick. All that effort to avoid using a cursor on an example that executes dbcc checkdb for each of just a few rows....

  • RE: The Numbers Table

    My original actual query was a lot different and maybe I've over simplified it for want of a simple example. I used to have two tables, RefDates which was just...

  • RE: The Numbers Table

    Jeff Moden (11/28/2008)


    jacRoberts,

    I have SET NOCOUNT ON in the test code so I can't do the verification. Pardon me for asking stupid questions, but I have to check... Have...

  • RE: The Numbers Table

    Jeff Moden (11/28/2008)


    I'm not sure what's going on... I ran the code you modified and here's what I got...

    ===== Set based method with Date table =====

    SQL Server Execution Times:

    ...

  • RE: The Numbers Table

    Joe Celko (11/28/2008)


    Let me make an appeal to simple logic.

    You build a look-up table once (and if you did a proper calendar table, you also benefit from other uses). ...

  • RE: The Numbers Table

    Jeff Moden (11/27/2008)


    jacroberts (11/27/2008)


    Ok, I have recently written some code that uses an RBAR TVF to increase the efficiency and speed of a query.

    Here's my example:

    We had a...

  • RE: The Numbers Table

    Lynn Pettis (11/27/2008)


    jacroberts (11/27/2008)


    Lynn Pettis (11/27/2008)


    jacroberts (11/27/2008)


    timothyawiseman (11/27/2008)


    jacroberts (11/25/2008)


    timothyawiseman (11/24/2008)[hr

    This is true, for a small number of rows. Your RBAR TVF will become ineffecient should requirements change and the...

  • RE: The Numbers Table

    Lynn Pettis (11/27/2008)


    jacroberts (11/27/2008)


    timothyawiseman (11/27/2008)


    jacroberts (11/25/2008)


    timothyawiseman (11/24/2008)[hr

    This is true, for a small number of rows. Your RBAR TVF will become ineffecient should requirements change and the number of rows...

  • RE: The Numbers Table

    timothyawiseman (11/27/2008)


    jacroberts (11/25/2008)


    timothyawiseman (11/24/2008)[hr

    >>The problem is that your example did not show a case where efficiency is not a concern.

    >>But, in your example you say there is no need to...

  • RE: The Numbers Table

    Adam Machanic (11/25/2008)


    Is it me or do you seem to be in the minority here?

    Minority here on SSC where people are a bit more educated about these things, but certainly...

  • RE: The Numbers Table

    peter (11/25/2008)


    jacroberts (11/25/2008)


    Adam Machanic (11/25/2008)


    Anyone can take any example and change it so it performance is important.

    You're absolutely right! Why do you suppose that it happens to be so...

  • RE: The Numbers Table

    Adam Machanic (11/25/2008)


    Anyone can take any example and change it so it performance is important.

    You're absolutely right! Why do you suppose that it happens to be so easy?

    Is it...

  • RE: The Numbers Table

    Adam Machanic (11/25/2008)


    If you have a daily report that is run in batch, with no user waiting at the end of a button for the result, it doesn't matter if...

Viewing 15 posts - 2,581 through 2,595 (of 2,610 total)