Forum Replies Created

Viewing 15 posts - 4,591 through 4,605 (of 49,552 total)

  • RE: SQL deadlock victim

    Turn traceflag 1222 on. That will result in a deadlock graph being written to the error log.

    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: last exected date for stored proc

    No.

    If the procedure has been executed recently, and the plan is still in cache, then you can query sys.dm_exec_procedure_stats, but a procedure will only have an entry in there if...

    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: Rollback of DBCC CheckDB Stuck

    If you had restarted SQL, the rollback would have started again from the beginning, with the database offline and inaccessible until the rollback had completed. It's a good way to...

    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: Can you add an index to a view

    Yes.

    Though it's pretty useless to just say yes/no, as there are lots of caveats, limitations and considerations.

    https://msdn.microsoft.com/en-za/library/ms191432.aspx

    https://www.simple-talk.com/sql/learn-sql-server/sql-server-indexed-views-the-basics/

    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: Assign value to variable

    You can't put that into a loop. Do it the way you wrote in the second post, each variable explicitly assigned one by one.

    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: Execution\Query plan force persist? is it possible?

    Huh?

    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: Are the posted questions getting worse?

    #gloat Company's paying for the trip to the US. If I was speaking at Pass Summit, they'd be paying for hotel too. They paid for my trip to the Cape...

    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: Assign value to variable

    What's wrong with it?

    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: Execution\Query plan force persist? is it possible?

    Ok, yeah, that's the plan compiling taking that time, assuming that it consistently takes 35 minutes run with recompile.

    To be honest, not much you can really do. Maybe try to...

    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: Execution\Query plan force persist? is it possible?

    Are you sure it's the plan being cached that saves the time, and not the data being cached. Test with a warm data cache and the plan removed from cache,...

    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: Blocking query with nolock in it

    Markus (10/6/2015)


    That just might be it.... when I look at her SPID SQL it shows the select... hum....

    Yes, because the DMVs show the last statement that a session ran, or...

    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: Database Shrink

    You could probably safely shrink it (once) to 175 or 200GB.

    It can take a long time, but it's an online operation. I would recommend it be done out of main...

    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: Blocking query with nolock in it

    Unless she's starting a transaction and not committing (and making some form of data modifications in the transaction), closing the query tool is not necessary. In the absence of transactions,...

    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: Partitioning Table Strategie

    ps_vbdev (10/6/2015)


    Your explanation makes total sense but where would the implicit conversation take place?

    In your queries, if you're ever doing anything like

    WHERE UserID = @ParameterOfTheUniqueidentifierType, or anything similar

    And if...

    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: Blocking query with nolock in it

    Grant Fritchey (10/6/2015)


    Unless they're starting a transaction and then walking away with it uncommitted.

    Seen that happen before. Brought am entire application to a complete standstill on all users' machines.

    If it...

    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 - 4,591 through 4,605 (of 49,552 total)