Forum Replies Created

Viewing 15 posts - 2,206 through 2,220 (of 10,144 total)

  • RE: Metrics Table or Performance Tuning

    ScottPletcher (8/25/2015)


    ChrisM@Work (8/25/2015)


    ScottPletcher (8/25/2015)


    ChrisM@Work (8/25/2015)


    ScottPletcher (8/21/2015)


    ChrisM@Work (8/21/2015)


    ScottPletcher (8/21/2015)


    ChrisM@Work (8/21/2015)

    The inner select can be accelerated with this index:

    CREATE INDEX ix_Helper ON [cts].[exception_Main]

    (productArea, reportable, reportYear, reportMonth, queueID)

    INCLUDE (volume, cost, exceptionDateTime)

    But...

  • RE: Metrics Table or Performance Tuning

    ScottPletcher (8/25/2015)


    ChrisM@Work (8/25/2015)


    ScottPletcher (8/21/2015)


    ChrisM@Work (8/21/2015)


    ScottPletcher (8/21/2015)


    ChrisM@Work (8/21/2015)

    The inner select can be accelerated with this index:

    CREATE INDEX ix_Helper ON [cts].[exception_Main]

    (productArea, reportable, reportYear, reportMonth, queueID)

    INCLUDE (volume, cost, exceptionDateTime)

    But with the...

  • RE: Metrics Table or Performance Tuning

    ScottPletcher (8/21/2015)


    ChrisM@Work (8/21/2015)


    ScottPletcher (8/21/2015)


    ChrisM@Work (8/21/2015)

    The inner select can be accelerated with this index:

    CREATE INDEX ix_Helper ON [cts].[exception_Main]

    (productArea, reportable, reportYear, reportMonth, queueID)

    INCLUDE (volume, cost, exceptionDateTime)

    But with the best clustered...

  • RE: Case statement that contains multiplication

    cory.bullard76 (8/25/2015)


    the datatype for that field is a Varchar

    Yes, but how many characters?

    VARCHAR(n)

  • 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?

    Gail's asking you to look at the table definition. Easiest way to do that is...

  • RE: udf with tally table runs slower than while loop

    Josh Leane-155117 (8/25/2015)


    Thanks for the additional suggestions Chris. I tried with the Tally table in the function, that slowed it slightly from 5 secs to 7 secs. Presumably...

  • RE: conversion failed on nested query

    cajun_sql (8/24/2015)


    Hi,

    I'm working with a 'nested query,' which is needed to only select the non-top IDs of a resultset having more than one row with an ID in common.

    In other...

  • RE: Select top 101

    mariandalalau (8/24/2015)


    ...

    The query is like this:

    select top 100 GroupId, count(HouseId)

    from House h

    group by h.GroupId

    order by max([DateCreated]) desc

    ...

    The query is like this, or the query is this? If your actual query...

  • RE: Skip and update every 'n' row

    select

    n,

    NewColumn = CASE n%4 WHEN 1 THEN 'A' WHEN 2 THEN 'B' WHEN 3 THEN 'C' WHEN 0 THEN 'D' END

    from ( -- just some sample...

  • RE: Designing Query

    mitzyturbo (8/24/2015)


    Sorry for the delay lads

    Sean, apologies I'm on here long enough to know what I should have included with this one, please see below for sample data and existing...

  • RE: udf with tally table runs slower than while loop

    Josh Leane-155117 (8/24/2015)


    Hi Chris, I tried your suggestions,

    1) clustered index on tally table didn't make any difference, still 120 secs on test data

    2) using LEN(@vstrText) < N made huge...

  • RE: Are the posted questions getting worse?

    I'd like to nominate Steve Munson for an honorary SSC sainthood for his handling of the OP in this thread. Steve stuck with it through to the end when mere...

  • RE: udf with tally table runs slower than while loop

    There are three key problems with the way you have structured the tally table version.

    Firstly, your tally table should have a unique clustered index on n, or define it...

  • RE: Metrics Table or Performance Tuning

    ScottPletcher (8/21/2015)


    ChrisM@Work (8/21/2015)

    The inner select can be accelerated with this index:

    CREATE INDEX ix_Helper ON [cts].[exception_Main]

    (productArea, reportable, reportYear, reportMonth, queueID)

    INCLUDE (volume, cost, exceptionDateTime)

    But with the best clustered index now...

  • RE: how to overcome from the tempdb spill over ?

    Some generic reformatting:

    SELECT

    DA.DeterminantID, DA.DeterminantGroupID, D.ModifiedDate, DAV.TypeID, DA.IncludeDataFormat, DA.ExcludeDataFormat, DAV.VALUE1, DAV.VALUE2, DA.AddDate,

    CASE WHEN DF.TblName = 'Codes'

    THEN CASE

    WHEN DF.DeterminantField = 'CPT Codes' THEN 1

    WHEN DF.DeterminantField = 'Revenue Codes' THEN 0

    WHEN...

Viewing 15 posts - 2,206 through 2,220 (of 10,144 total)