Forum Replies Created

Viewing 15 posts - 4,996 through 5,010 (of 49,552 total)

  • RE: Percentage of Fragmentation increased after 6 hours

    Well fragmentation is either caused by a data file shrink or by inserts/updates causing page splits, so if you have no shrink operations then it's probably page splits. Try dropping...

    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: Data across different data centers

    What you're asking there is seriously, seriously complex. If you really want read-write on all nodes, then peer-to-peer replication (or maybe merge replication) is the only option, but to work...

    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: Bizarre Divide by Zero behaviour

    I'd still recommend you put a CASE around the division (see my edits in earlier post), as a plan change could still result in the division happening before the filter.

    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: Bizarre Divide by Zero behaviour

    What does this return?

    SELECT

    i.CPSP35

    ,i.VINT35

    FROM DEV.dbo.INP35

    WHERE VINT35 = 0

    SQL may run the division before it does the filter and join, so if there are rows with VINT35 = 0...

    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: Select Records based on Year

    Well you don't say what column in the table has the date in, and comparing one variable to another isn't going to do much.

    Should get you started:

    DECLARE @StartOfYear DATE

    SET @StartOfYear...

    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: Select Records based on Year

    Duplicate post. No replies please

    Replies to http://www.sqlservercentral.com/Forums/Topic1712220-3077-1.aspx

    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: Select Records based on Year

    Duplicate post. No replies please

    Replies to http://www.sqlservercentral.com/Forums/Topic1712220-3077-1.aspx

    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: Sys.Master_Files shows another output then sys.Database_Files

    Another place BoL is wrong.

    If you look at TempDB as an example, master_files shows the default size for the files (what TempDB starts at), while database_files shows the current size...

    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: SSIS 2008 R2 - Failed Login but correct credentails

    Look in the SQL error log (the instance you're trying to connect to). What's the full login failure message from 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: Sys.Master_Files shows another output then sys.Database_Files

    Master_files shows the files as of the last time SQL started. Database_files shows the current values.

    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: Adding a conditional Join

    Ken McKelvey (8/17/2015)


    1. You do do not want a conditional join as it will kill the query plan.

    Yup. I'd say leave it as two queries, possibly even make it two...

    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: IIf User Defined Function in 2008 R2

    I strongly recommend you don't use a UDF. The performance overhead can be nasty, and you'll still have to change all your code, because UDFs have to be prefixed with...

    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 in Recovery

    Chris.Hubbard4U (8/14/2015)


    It finally recovered.:-)

    Yup, and about all you can do with a long recovery process is wait. There are no commands which can force a database out of recovery, and...

    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: Which is Best to use, #Temp Table or @Table Variable?

    Gary Harding (8/14/2015)


    Can you define a nonclustered index on a non-unique set of columns in a table variable?

    No, at least not before SQL 2014, but you can always add...

    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 Plan "table Spool"

    Seconding Chris's request to see the execution plan. The query alone is not very useful.

    As for indexes: http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/

    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,996 through 5,010 (of 49,552 total)