Forum Replies Created

Viewing 15 posts - 10,966 through 10,980 (of 49,552 total)

  • RE: How to reduce the joins in sql querry

    Maybe, maybe not. Depends on the specifics of the queries, among other things. Temp tables aren't a replacement for joins, they're not an automatic performance improvement.

    Again, are you sure that...

    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: Truncate / Shrink Log for Mirrored Databse

    Log backups don't shrink the log. They just mark it as reusable.

    Please read the article I referenced.

    Then, set up regular log backups and do a once-off (not regular, not scheduled)...

    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: Truncate / Shrink Log for Mirrored Databse

    Are you running regular log backups? With that size of log file, I suspect not.

    Please take a read through this: http://www.sqlservercentral.com/articles/Administration/64582/

    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 the joins in sql querry

    Firstly, are the joins the problem?

    And short answer, you don't join tables without joins.

    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: DB Offline

    Krishna1 (11/13/2013)


    I would like to check with you if SQL server maiantains the history of the SPID and user

    It does 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: DB Offline

    Krishna1 (11/13/2013)


    Can you explain where i can see this information.

    I said in my previous post. It should be in the default trace.

    Also, taking a DB offline or bringing...

    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: DB Offline

    Should be in the default trace. Otherwise ask the other DBAs, it required DB_owner permissions or high server level permissions, so not something that everyone should be able to do.

    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: DB Offline

    Someone ran ALTER DATABASE ... SET OFFLINE, or that command is in a job somewhere. SQL won't take a DB offline by itself, someone or some app ran the ALTER...

    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: Best Practices for implementing Indexes

    Just run the create index statements, not much more to it than that.

    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: Statistics Needed - When loading data?

    curious_sqldba (11/12/2013)


    GilaMonster (11/12/2013)


    Nope. Not unless your bulk load is querying the table first. Stats do not get created or updated unless they are needed to generate an execution plan.

    So bulk...

    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 log info from a stored procedure

    If you just replace the ad-hoc SQL with an EXEC <procedure>, you'll get the same information logged as you currently are getting.

    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: Statistics Needed - When loading data?

    Nope. Not unless your bulk load is querying the table first. Stats do not get created or updated unless they are needed to generate an execution plan.

    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: NC index seek vs NC index scan with implicit conversion

    The why is pretty simple. Any function when used on a column makes the predicate non-SARGable, or not usable as a seek predicate. Implicit conversions are same as explicit conversions,...

    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 log info from a stored procedure

    Unless you create your own logging infrastructure, no. SQL does not keep execution history.

    Now, you can create it as a stored procedure and call the procedure from your batch file....

    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: NC index seek vs NC index scan with implicit conversion

    Your sample set is way too small. Everything's fast on 10 rows.

    Estimated and actual rows will be the same for the seek and scan, because it's the number of rows...

    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 - 10,966 through 10,980 (of 49,552 total)