Forum Replies Created

Viewing 15 posts - 13,756 through 13,770 (of 49,552 total)

  • RE: Performance ISSUE by USING CURSOR HELP !!!!

    Terry300577 (3/25/2013)


    have you ever used a while loop in SQL.. i tend to use these over cursors these days and find they perform a lot better.

    http://sqlblog.com/blogs/aaron_bertrand/archive/2012/01/26/the-fallacy-that-a-while-loop-isn-t-a-cursor.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Auto Create/Update Statistics for TempDB

    Honestly, I'd leave them both on unless you have a bloody good reason to turn them off and you have code that creates stats on every temp table that you...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Is DBCC CHECKDB an appropriate weekly check for a 365x24x7 availability db?

    anthony.green (3/25/2013)


    The only impact to the users would be while the snapshot is being created that DBCC CHECKDB runs on, so will be very minimal.

    The creation of the snapshot won't...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Is DBCC CHECKDB an appropriate weekly check for a 365x24x7 availability db?

    CheckDB is an online operation. Users may note slow down, but that's all.

    Better question, if your database becomes corrupt, how soon do you want to find out about it and...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Lock only one row in update (lock a row)

    You want the ROWLOCK hint. Do note that just tells SQL to start with row locks, it can and will still escalate if need be. It will also still take...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: how to reduce sort on order by?

    I think there's something missing from your sample code.

    In short, you can't really reduce the cost, sorts are expensive operations, if you need a sorted resultset, you have to accept...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: backup

    What is there to explain? You asked whether the two uncommitted transactions would be backed up with the transaction log. The answer is yes, they will be.

    If you have further...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: backup

    All of them.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Time-out occurred while waiting... Reset to device warning

    opc.three (3/24/2013)


    DTS? What version of SQL Server are you on?

    Andres Zoppelletto (3/23/2013)


    I´m running SQL2005 since a couple of years on server...

    DTS runs fine on SQL 2005 and 2008. Deprecated, not...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fragmentation in database

    Number of pages. Pointless defragging a tiny table. Avg page density in percent, wasted free space on a page may indicate a rebuild even if fragmentation is low.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: instead of triggers

    Duplicate post. No replies to this thread please. Direct replies to:http://www.sqlservercentral.com/Forums/Topic1434671-391-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: instead of triggers

    That's Oracle code, not SQL Server, hence the explanation will be relevant to Oracle's behaviour. If you have a question on Oracle, you're better off asking on an Oracle forum,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Time-out occurred while waiting... Reset to device warning

    "Could not continue scan with NOLOCK due to data movement"

    This one is mostly caused by using NoLock hints or the read uncommitted isolation level. If you're getting it a lot,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Why am I having so much trouble restoring?

    RESTORE DATABASE <new database name> FROM DISK = <backup location>

    WITH MOVE ....

    Probably easier to do with T-SQL than the GUI.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: 2008 SP2 Recompile

    Bobby Glover (3/23/2013)


    Thanks Steve, but what I'm trying to find out is what problems occur with it in SQL 2008 SP1.

    In 2008 SP1 the behaviour is exactly the same as...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 13,756 through 13,770 (of 49,552 total)