Forum Replies Created

Viewing 15 posts - 14,401 through 14,415 (of 49,552 total)

  • RE: Help on sys.dm_db_index_physical_stats

    If you use the detailed option, index physical stats shows you all levels of the indexes, so that'll be leaf and non-leaf (root if there's only 2). You can see...

    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: Severe error occurred on the current command. How bad is corruption fix?

    That one is trivial to fix fortunately

    Take the DB into single user mode and run DBCC CheckDB with the repair_rebuild option.

    Drive failure, probably not. Something wrong somewhere in the IO...

    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: Do you really need the log file

    You can't switch to simple recovery with active database mirroring. You'll need to completely drop the database mirroring setup, then you can change recovery models. Recreating the mirror will require...

    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: Optimize ad hoc workloads

    opc.three (2/5/2013)


    SQLRNNR (2/5/2013)


    sqlfriends (2/5/2013)


    Thanks ALL.

    I read a tutorial and recommend this option should be enabled for all instances. Read and still a little confusing about when I should enable 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: Performance Issue - understanding query plans

    nick.mcdermaid (2/5/2013)


    Do you expect any variance between the actual and estimated plan if I generate the estimated plan while the actual query is running (i.e. stats and record counts are...

    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: t-sql alter problem

    ALTER TABLE <table name> DROP CONSTRAINT <primary key name>

    ALTER TABLE <table name> ALTER COLUMN <column name> <new data types>

    ALTER TABLE <table name> ADD CONSTRAINT <primary key name> PRIMARY KEY (<columns...

    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: Recovery mode & replication

    Do Not Shrink your log file to 1MB.

    If you insist on shrinking, shrink to a sensible size.

    As to whether that's an acceptable option, what's the data loss allowance on 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: What's wrong with my DISTINCT

    Cause Lynn left out some brackets

    WITH BaseData AS (

    SELECT

    rn = ROW_NUMBER() OVER (PARTITION BY EMPLOYEE_ID ORDER BY ADMISSION_DTE DESC),

    CONVERT (VARCHAR(9), EMPLOYEE_ID) 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: Recovery mode & replication

    Replication has no dependency at all on recovery models.

    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: Optimize ad hoc workloads

    SQLRNNR (2/5/2013)


    GilaMonster (2/5/2013)


    SQLRNNR (2/5/2013)


    If you have a ton of one off types of queries - this can be helpful. The downside is that you may start seeing parameter sniffing...

    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: Display two fields of two UNRELATED tables WITHOUT crossjoin

    masoudk1990 (2/5/2013)


    I didn't want to join this two tables. I just wanted to understand how can I display two fields of two unrelated tables in one query without sql forcing...

    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: Optimize ad hoc workloads

    SQLRNNR (2/5/2013)


    If you have a ton of one off types of queries - this can be helpful. The downside is that you may start seeing parameter sniffing and longer...

    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: Optimize ad hoc workloads

    Is google down again?

    http://msdn.microsoft.com/en-us/library/cc645587.aspx

    http://blogs.msdn.com/b/timchapman/archive/2012/09/10/optimizing-ad-hoc-workloads.aspx

    http://www.sqlskills.com/blogs/kimberly/plan-cache-and-optimizing-for-adhoc-workloads/

    http://www.bradmcgehee.com/2011/04/do-you-enable-optimize-for-ad-hoc-workloads/

    4 of the top 5 results from a google search for "optimize for ad-hoc workloads"

    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: Display two fields of two UNRELATED tables WITHOUT crossjoin

    In this particular case, since you want the two counts...

    SELECT q1, q2 FROM

    (SELECT Count(a.PK) as q1 FROM Table1 as a) t1,

    (SELECT Count(b.PK) as q2 FROM Table2 as b) t2

    Only...

    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: What's wrong with my DISTINCT

    Distinct just removes complete duplicate rows (rows where all the columns you select are exactly the same)

    What is that query supposed to return?

    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 - 14,401 through 14,415 (of 49,552 total)