Forum Replies Created

Viewing 15 posts - 10,621 through 10,635 (of 49,552 total)

  • RE: Doubt in error handling

    vignesh.ms (12/18/2013)


    If I parse the above query using ctrl+f5 it wont give any error. Then how we say it is a parse time error?

    Because it occurs before execution starts. The...

    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 avoid KeyLookpu in Execution Plan of a Query ?

    Make the index on column2 (which you haven't shown) covering. Whether that's a good idea overall depends on how expensive that key lookup is and how expensive the additional modifications...

    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: Performance degrades after significant insert/delete workload

    Probably stale statistics. Try an UPDATE STATISTICS <table name> WITH FULLSCAN. If it works, schedule a job that runs the update stats on a regular basis against that table.

    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: SQL Server 2000 table statistics

    No, there isn't. SQL 2000 doesn't keep track of any of that, even 2005 onwards only tracks usage since the last restart.

    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: Help with updating records in a column.

    What was the code that you tried?

    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: Exec producing table out of scope

    By the way, you might want to do some reading on SQL Injection and why your code is a security vulnerability as written.

    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 find where one can make good index

    You need a representative workload for DTA to be even remotely accurate, so that's a trace file (or table, makes no difference) that recorded as much of a business cycle...

    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: Consolidation of SQl2008R2 servers to SQL2012?

    Just to give you an idea of the work involved in your request...

    When I was still consulting I got a request to quote for consolidation of three SQL Servers into...

    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: Exec producing table out of scope

    Yup, scoping means that the temp table will be dropped automatically as soon as the dynamic SQL finishes. Way around that is to create the temp table outside the dynamic...

    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 do you recover to a point in time?

    Daily transaction log backups? That means that up to 24 hours data loss is acceptable, so restoring to 1PM should be fine.

    If it's not fine, then that log backup...

    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 List out all tables indexes having index fragmentation more than 50% of databases.

    Neeraj Dwivedi (12/17/2013)


    Try this.

    SELECT

    B.name AS TableName

    , C.name AS IndexName

    , C.fill_factor AS IndexFillFactor

    , D.rows AS RowsCount

    , A.avg_fragmentation_in_percent

    , A.page_count

    FROM sys.dm_db_index_physical_stats(null,NULL,NULL,NULL,NULL) A

    INNER JOIN sys.objects B

    ON A.object_id = B.object_id

    INNER JOIN sys.indexes C

    ON B.object_id =...

    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 List out all tables indexes having index fragmentation more than 50% of databases.

    David Knapp (12/17/2013)


    I could not get this to work if the DB is running in SQL 2000 compatibility mode. I think for that the script needs to be changed a...

    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 Compatibility - Going Backwards

    thunderousity (12/17/2013)


    Does this depend upon how I do the restore. i.e. Restore and create the new database during restoration / Create the database and then do the restore separately

    The latter...

    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 Compatibility - Going Backwards

    You can change compatibility level up and down as much as you like. It's just a switch controlling how the query execution engine interprets some T-SQL constructs.

    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: Alternatives To Left Join: Poor Performance of Procedure

    Sounds like a NOT EXISTS, but it's not going to be measurable difference in performance just from changing 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

Viewing 15 posts - 10,621 through 10,635 (of 49,552 total)