Forum Replies Created

Viewing 15 posts - 25,246 through 25,260 (of 49,552 total)

  • RE: sys.dm_db_index_usage_stats

    The DBV is cleared when SQL restarts or when the database is closed.

    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?

    Before I seriously lose my temper (and the remnants of vacation bliss)

    http://www.sqlservercentral.com/Forums/FindPost1135189.aspx

    Writing scripts for admin purposes is not development? Really?

    "Practice and Recommendation are 2 different things" Really? Is 'Do 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
  • RE: Unnecessary Index?

    Syed Jahanzaib Bin hassan (7/1/2011)


    Dont use Clustered index column in the NonClustered index this is overhead

    No it's not. SQL includes the clustering key in all nonclustered indexes anyway whether 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: NonClustred Index on Primary key vs Clustred Index on Primary key

    For when you want to enforce uniqueness on a column or set of columns that's not the clustered index.

    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: Transaction Log

    Oh for crying out loud....

    Yes I absolutely did read the entire paragraph. Are you telling me that when DBAs write scripts they are not developing those scripts? What are they...

    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: Indexes:Few querries

    koustav_1982 (7/1/2011)


    Why is the optimiser using the index here? what help does it do? Will it ultimately not be similar to a table scan?

    A clustered index scan is a 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: NonClustred Index on Primary key vs Clustred Index on Primary key

    krish.sett (7/1/2011)


    please let me know what is the advantage of having NonClustred Index on Primary Key

    The main reason would be so that you can put the clustered index on 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: NonClustred Index on Primary key vs Clustred Index on Primary key

    laddu4700 (7/1/2011)


    When to use clustered index

    Large tables with more than 100 rows

    Frequently searched for columns

    Columns used in aggregate functions

    Columns used by group by and order by

    Columns used by JOIN...

    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: DBCC CHECKDB errors

    CheckDB with repair_rebuild will have no effect. The output of checkDB states that the minimum level to repair is repair_allow_data_loss, hence running a lesser repair level will not do anything.

    Got...

    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: Transaction Log

    Syed Jahanzaib Bin hassan (7/1/2011)


    btw, why do you persist in writing queries against a compatibility view that is deprecated and scheduled for removal. You're teaching people bad practices.

    is this...

    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: Transaction Log

    TST1 (7/1/2011)


    Thanks Gail, but the guy closed his session so I guess he'll have to re-write!

    The query I gave you will work even if he's closed the session, providing 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: Transaction Log

    Syed Jahanzaib Bin hassan (7/1/2011)


    If Code is executed then execute this script

    SELECT ST.TEXT,SP.SPID,WAITTIME,LASTWAITTYPE,CPU,PHYSICAL_IO,STATUS,HOSTNAME,PROGRAM_NAME,CMD,LOGINAME FROM SYS.SYSPROCESSES SP

    CROSS APPLY SYS.DM_EXEC_SQL_TEXT(SP.SQL_HANDLE) ST

    WHERE STATUS ='SLEEPING'

    ORDER BY CPU DESC

    That requires that the connection is still...

    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: Transaction Log

    Maybe, depends whether the query has flushed out of cache.

    SELECT text FROM sys.dm_exec_cached_plans cp CROSS APPLY sys.dm_exec_sql_text(cp.plan_handle)

    You'll have to do some filtering.

    Btw, this has nothing to do with the transaction...

    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: Stored procedure performance tuning

    Please post table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    p.s. Do you know your code is vulnerable to SQL injection?

    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 issue

    There's no magical configuration setting that will fix poor performance.

    http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/

    http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-2/

    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 - 25,246 through 25,260 (of 49,552 total)