SQL Query invoked by Crystal Reports v9.2 Performance Issue

  • I had a similar problem years ago where timeouts would occur looking up in a traffic accident database. The problem was that each accident was coded to two streets, but you never knew and couldn't enforce whether the accident was entered as Central & Northern or Northern & Central. The WITH RECOMPILE fixed it sweet. I think that's perhaps the only time that I've used that option, it's a good thing to be reminded of it every once in a while.

    -----
    [font="Arial"]Knowledge is of two kinds. We know a subject ourselves or we know where we can find information upon it. --Samuel Johnson[/font]

  • Coincidentally I just now ran across a quite interesting article on this subject by Erland Sommerskog in his blog and since I didn't see anyone post that link here, I will:

    Slow in the Application, Fast in SSMS? Understanding Performance Mysteries

    Unfortunately, it is too late for me to do the analysis now as I've un-cached my problematic plan. But next time, you can bet I'll be ready!

    Posted this answer to another thread too, but putting it here in case someone finds this one in Google instead of the other.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St

  • Nice link. Thanks, Dwain.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • dwain.c (2/10/2015)


    Coincidentally I just now ran across a quite interesting article on this subject by Erland Sommerskog in his blog and since I didn't see anyone post that link here, I will:

    Slow in the Application, Fast in SSMS? Understanding Performance Mysteries

    Unfortunately, it is too late for me to do the analysis now as I've un-cached my problematic plan. But next time, you can bet I'll be ready!

    Posted this answer to another thread too, but putting it here in case someone finds this one in Google instead of the other.

    That's the one I was thinking of when I suggested looking at SET options/2 plans in the cache 🙂

Viewing 4 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic. Login to reply