Forum Replies Created

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

  • RE: Cursors Be Gone!

    Jeff Moden (1/2/2009)


    Alexander Kuznetsov (12/24/2008)


    Actually in most cases the best alternative is a loop written in a modern language such as C#, not a T-SQL WHILE loop or a CURSOR....

  • RE: Cursors Be Gone!

    battelofhalfwits (1/1/2009)


    Also, when you say "Imagine scaling the cursor to tables with millions of rows". I'm imagining it! Are you sure that inserting the rows into a temporary table with...

  • RE: Cursors Be Gone!

    Jeff Moden (1/1/2009)


    One of my fellow MVP's... Go back and look at Grant's posts... you'll figure it out. I've probably said too much, already.

    When you say "fellow MPV's" does...

  • RE: Cursors Be Gone!

    Matt Whitfield (1/1/2009)


    Jeff Moden (1/1/2009)


    Yes! He actually want's to delete FROM from UPDATE. The smiley face was an indication of something else this time...

    Daym.

    Has anyone told him about...

  • RE: Cursors Be Gone!

    Haroon Said (12/24/2008)


    Just for fun if you had a banking application with millions of account records in a table and had to calculate some complex interest every day on the...

  • RE: Cursors Be Gone!

    Matt Whitfield (12/24/2008)


    @jacroberts -

    I didn't get any faster results out of the firehose than I did out of the select-only method. I ran it a few times, they came out...

  • RE: Cursors Be Gone!

    Shane Redding (12/24/2008)


    Does anyone know where all this negativity came from about cursors? All I've read about this year are articles saying get away from cursors, "Very Bad" for your...

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

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