Forum Replies Created

Viewing 15 posts - 4,276 through 4,290 (of 5,394 total)

  • RE: Are the posted questions getting worse?

    Steve, I suppose you noticed that my previous "ouch" had a link to another thread...

  • RE: Will Virtual Machines slow down T-SQL queries??

    Heh, Mr. Coffee, virtual machines are horribly slower than physical machines.

    There's a virtualization layer between your system and the physical resources: CPU, disks and memory must be accesses through...

  • RE: SQL Server 2008 latest release

    SQL Server 2008 R2 RTM is out since May 3rd.

    I installed it on my laptop and in SSMS about dialog I get:

    Microsoft SQL Server Management Studio10.50.1600.1

    Hope this helps

    Gianluca

  • RE: Code generation

    Great explanation, Jeff! That's one thing I wanted to ask.

    It's strange to see that partition by seems to be faster than distinct. I would have expected to be equally...

  • RE: Views Vs Stored Procs

    GilaMonster (5/12/2010)


    The Dixie Flatline (5/11/2010)


    Gianluca, did I understand you to say that queries against views don't have their query plans cached? Surely not.

    Views do not have cached exec...

  • RE: Views Vs Stored Procs

    I would code as a stored procedure, as it can cache the query plan.

    It's a quite vague question, without any other requirement this is all I can suggest.

    Hope this helps

    Gianluca

  • RE: Code generation

    I get:

    19 seconds for the first run

    16 seconds for the second run

    Don't run the select * from #myhead statement, as it involves presenting results in SSMS.

  • RE: Possible parameter sniffing?

    Grant Fritchey (5/11/2010)


    I hate using hints. Any hints. I always feel that using a hint means I've failed in my tuning efforts.

    Me too. That's why I hate tuning queries...

  • RE: Copy_Only Backup

    I've never done that, but, according to BOL's description of copy only backup, I think it can be done.

  • RE: Code generation

    Great code, Jeff!!

  • RE: Possible parameter sniffing?

    The issue with the RECOMPILE hint is the one described here by Erland Sommarskog. Maybe I misunderstood what he meant, but I still believe there's something wrong with it.

  • RE: Possible parameter sniffing?

    The only downside I see in using hints is that they have statement scope, not procedure scope. If I remember right, there's an issue still not fixed in the RECOMPILE...

  • RE: Possible parameter sniffing?

    It makes sense. Everything I can suggest is trying to convert the code into dynamic SQL. It's fast and it doesn't cache bad plans.

    You could use the ability of...

  • RE: calculate dates between rows

    It can surely be converted in SQL2000 code.

    Just get rid of CTEs and PIVOT and it will look like this:

    SELECT [Art],

    Avg_Days_in = SUM(CASE [Status] WHEN 'In' THEN AVG_DIFF...

Viewing 15 posts - 4,276 through 4,290 (of 5,394 total)