Forum Replies Created

Viewing 15 posts - 4,921 through 4,935 (of 49,552 total)

  • RE: Index Selection

    From the definitions you posted, CaseNo is second column in both of those indexes. Since CaseNo is the second column, neither of those indexes are seekable, so it will have...

    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?

    Nope. Only when they're on a join or where clause predicate which prevents index usage.

    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: summation of a calculated time difference field

    I'm using two SUMs because you want two columns summed. The first (9+8+8+5) = 30, the second (1+1+1+1) = 4.

    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: Becoming a consultant

    Fuel, rent, groceries, phone and internet access, insurances, retirement savings, medical expenses, etc, etc. Work out how much you have to spend per month, it's often more than you initially...

    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: Command for adding new drives?

    What do you mean 'add drives'?

    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: summation of a calculated time difference field

    SELECT SUM(UnnamedColumn1) AS Total,

    SUM(UnnamedColumn2) AS EmployeeCnt,

    Parameter_3

    FROM (SELECT DATEDIFF(s, MIN(CONVERT(VARCHAR(8), TRANSIT_DATE,...

    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: High CPU usage by sql server

    Joy Smith San (8/26/2015)


    however any suggestions for further investigation from that point of view ?

    Yes. Don't try things at random.

    Do your analysis. Identify the heaviest overall CPU-using queries. Tune them.

    If...

    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: High CPU usage by sql server

    High memory usage is by design. SQL uses memory, as much as you allow it to use, this is not a problem or something that needs to be fixed.

    For high...

    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: Becoming a consultant

    If you're talking about going solo:

    Make sure you have 4-6 months income saved up. You'll probably need it.

    Make sure you're comfortable with the non-technical side of things. Billing, finding 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: How to reset DMV counters

    joe.arias (8/25/2015)


    DBCC FreeProcCache does clear sys.dm_exec_query_stats

    If you are testing and tuning for performance, this can be invaluable way to save time.

    It does, but it doesn't clear any other DMVs (other...

    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 determine when a statistic was last used by the optimizer? Cleaning-up Auto-Generated Stats

    Correct.

    There's no DMV which records usage, short of running every query with a traceflag on, it's very, very hard to tell that the optimiser found stats interesting.

    You could, 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

    In that case, this should work.

    case when parts.ndc = '50242-0138-01' then CAST(labels.BAGSDISP AS Numeric(6,2)) *0.9 ELSE -1 end [Units Dispensed]

    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

    ChrisM@Work (8/25/2015)


    cory.bullard76 (8/24/2015)


    The values from labels.bagdisp range from 2-60. Is that what you are asking for?

    Gail's asking you to look at the table definition.

    No, I wanted the range...

    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

    cory.bullard76 (8/24/2015)


    The values from labels.bagdisp range from 2-60. Is that what you are asking for?

    Half. Can you confirm there are *no* non-numeric values? (no 'abc', no '_', nothing except...

    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?

    Brandie Tarvin (8/25/2015)


    GilaMonster (8/25/2015)


    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....

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