Forum Replies Created

Viewing 15 posts - 4,936 through 4,950 (of 49,552 total)

  • RE: Are the posted questions getting worse?

    djj (8/24/2015)


    GilaMonster (8/24/2015)


    I think it's in anticipation of my Star Wars RPG tonight. The puny resistance movement will be crushed under the might of the Imperial Army. The Emperor has...

    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: Reading the .mdmp files

    You need Windbg (the windows debugger), the public symbols files for the version of SQL, and a good amount of internals knowledge (windows and SQL)

    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?

    Welcome to a few thousand pages into a thread which is more a general chat thread than anything else these days.

    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: SET TABLE VARIABLE FROM FUNCTION CALL

    James_R_Alves (8/24/2015)


    There may be a performance benefit to using table vars over # temp tables as well.

    A negative one usually, due to the lack of statistics.

    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: Case statement that contains multiplication

    Could you look at the table and find out? Or would you prefer I guess as to the appropriate data type and give you a query that could throw more...

    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 top 101

    mariandalalau (8/24/2015)


    If I put max([DateCreated]) in the select the result is the same, actually the DateCreated is the same for all records in the same group.

    That's what I suspected. What...

    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: Case statement that contains multiplication

    It's preferable to do explicit conversions.

    What's the range of values in that column (10? 100? 1000? 100000?), and are there any non-numeric 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: Are the posted questions getting worse?

    I think it's in anticipation of my Star Wars RPG tonight. The puny resistance movement will be crushed under the might of the Imperial Army. The Emperor has foreseen it!

    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 top 101

    Any time you're debugging an order problem, put the column that you're ordering by into the select.

    select top 100 GroupId, count(HouseId), max([DateCreated])

    from House h

    group by h.GroupId

    order by max([DateCreated]) desc

    If 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: Case statement that contains multiplication

    Take each column in the query, look at the base table and check the data type. Identify where you're comparing a varchar to a number, or doing any form of...

    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: Case statement that contains multiplication

    Check your query, see where you're trying to convert a varchar to a numeric value. See what types are involved.

    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: Case statement that contains multiplication

    If you're getting NULL, either labels.BAGSDISP is NULL or parts.ndc is equal to something other than the literal. There's no ELSE clause of the CASE, so if there's no match,...

    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: Features, etc that cannot be managed from a previous version of SSMS?

    SSMS 2012 tends to throw odd errors intermittently when connected to a SQL 2014 server. I had ignorable errors show up any time I right-clicked on anything in object explorer.

    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 are your five most common T-SQL commands

    These would be for when I'm working on client systems.

    In no particular order:

    SELECT * FROM sys.dm_exec_requests er CROSS APPLY sys.dm_exec_sql_text(er.sql_handle) st;

    SELECT TOP(1000) * FROM sys.dm_exec_query_stats qs

    CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle)...

    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 does Microsoft recommend defragmenting SQL Server data files at the OS file-system level?

    Err, what's the question here?

    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,936 through 4,950 (of 49,552 total)