Forum Replies Created

Viewing 15 posts - 2,566 through 2,580 (of 2,617 total)

  • RE: Twenty tips to write a good stored procedure

    ronmoses (8/10/2009)


    10. WHERE clauses - In a WHERE clause, the various operators used directly affect how fast a query can run. Here are the conditional operators used in the WHERE...

  • RE: Cursors Be Gone!

    Jeff Moden (1/9/2009)


    Remember... if you're gonna practice the piano, no sense in intentionally hitting the wrong keys. 😀

    Unless you are one of these:

    http://www.youtube.com/watch?v=9nNGlaiVypU

    http://www.youtube.com/watch?v=XooTrS440Us

  • RE: Cursors Be Gone!

    Matt Whitfield (1/9/2009)


    So, collectively we fixed a logic funny for you, and made it quicker to boot.

    Go team! 😛

    Ultimate props to Jeff on this one - I think the...

  • RE: Cursors Be Gone!

    Site Visits Results

    Summary

    Three tests were run with different methods of calculating site visits.

    1. Using a normal cursor - jacroberts

    This took 29:36 to complete

    2. Using a "pseudo" cursor - Jeff...

  • RE: Cursors Be Gone!

    TheSQLGuru (1/5/2009)


    jacroberts, I imagine this query may be succeptible to parameter sniffing due to the where clause. Well, that assumes there is an index that is useful here and...

  • RE: Cursors Be Gone!

    The first bit of testing is finished. Firstly I am just testing the different initial queries to get the data. So no results from the cursors yet. I've had to...

  • RE: Cursors Be Gone!

    Matt Whitfield (1/3/2009)


    @jacroberts - can you include that last one in your test runs monday? I know it's cheating, but I think coming up with the best performing solution is...

  • RE: Cursors Be Gone!

    Jeff Moden (1/3/2009)


    jacroberts (1/3/2009)


    I take is that @PrevKeep variable is redundant as it doesn't seem to be used?

    BWAA-HAAA!!! Well, at least I know someone read the code. Yes...

  • RE: Cursors Be Gone!

    I take is that @PrevKeep variable is redundant as it doesn't seem to be used?

    BWAA-HAAA!!! Well, at least I know someone read the code. Yes sir, I made...

  • RE: Cursors Be Gone!

    Jeff Moden (1/3/2009)


    OK... here we go. First, I'm gonna recommend that you add the following index to the WebLogEvents table... it will NOT interfere with inserts or deletes, will...

  • RE: Cursors Be Gone!

    Jeff Moden (1/3/2009)


    jacroberts (1/2/2009)


    The stored procedure that calls the function just takes the results table from the TVF and inserts this into a reporting table number of new site visits...

  • RE: Cursors Be Gone!

    Matt Whitfield (1/2/2009)


    Before i start - a couple of things. Given the volume of data you're talking about, i'm not confident my first method would be quicker. Because it's a...

  • RE: Cursors Be Gone!

    Jeff Moden (1/2/2009)


    Ok... from JacRobert's description, Create Table statement, and a couple of good guesses like the fact that since all the columns are nullable, there's no primary key, here's...

  • RE: Cursors Be Gone!

    Jeff Moden (1/2/2009)


    I agree... JacRoberts, would you provide the CREATE TABLE statement for the dbo.WebLogEvents table, please. From that, I'll make a million row table over a period of...

  • RE: Cursors Be Gone!

    TheSQLGuru (1/2/2009)


    jacroberts, I am pretty sure (>90%) that your problem can be solved with a self-join set-based solution. If the table is properly indexed that solution could well be...

Viewing 15 posts - 2,566 through 2,580 (of 2,617 total)