Forum Replies Created

Viewing 15 posts - 4,876 through 4,890 (of 7,614 total)

  • RE: Stored Procedure runs fine on the Production Server and two Test Server but not on the replicated Server.

    Check the statistics on the replicated server, make sure they are current (or at least as current as the other servers).

  • RE: One of the most complex Views i have ever seen (View nested into another view)

    I think you can combine the two queries, possibly if will perform better, esp. if the joins are a lot of overhead. As to the joins, they seem fairly...

  • RE: Metrics Table or Performance Tuning

    ChrisM@Work (8/25/2015)


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

  • RE: Metrics Table or Performance Tuning

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

  • RE: Metrics Table or Performance Tuning

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

  • RE: Replace and Substring

    UPATE TblNAme

    SET DOB = substring(DOB,5,4)+SUBSTRING(DOB,1,2)+SUBSTRING(DOB,3,2)

    WHERE ISDATE([DOB]) != 1

    and DOB is not null

    and DOB <>''

  • RE: Interesting results with Len and varchar(max)

    Iow, be sure to cast at least one of the values in the expression to (max):

    select @t=cast('abc' as varchar(max)) + replicate('x', 2000) + char(10) +

    'abc' + replicate('x', 2000)+ char(10)...

  • RE: Fine tuning Queries

    Jeff Moden (8/21/2015)


    For too many reasons to explain here, SQL Server really, really likes NOT NULL, UNIQUE, ever increasing, narrow clustered indexes. A date time column can be very...

  • RE: Fine tuning Queries

    The key to best performance is the best clustering index.

    For what's shown, the only potential change that's needed is for the credit_application table. Perhaps it should be clustered on...

  • RE: Metrics Table or Performance Tuning

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

  • RE: Metrics Table or Performance Tuning

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

  • RE: Metrics Table or Performance Tuning

    Interesting. Edit: The only reason that particular join should be slow is the large number of lookups, since the map_exception table only has a few hundred rows. End-Edit.

    At any...

  • RE: return the code that sp_MSforeachtable would produce

    drew.allen (8/19/2015)


    ScottPletcher (8/19/2015)

    Be careful. The ? is replaced with a fully delimited schema and table, such as:

    [dbo].[table1]

    I didn't realize that was the case. In that case my query...

  • RE: return the code that sp_MSforeachtable would produce

    Excellent point about the underscore, it definitely needs bracketed.

    Be careful. The ? is replaced with a fully delimited schema and table, such as:

    [dbo].[table1]

    Thus, a comparison like:

    IF ''?'' LIKE ''%[_]st''

    can...

  • RE: Account Number Transformation

    CREATE TABLE #AccountNum_Custom_Handling (

    AccountNum varchar(50) NOT NULL PRIMARY KEY,

    action_to_take char(1) NOT NULL

    CHECK(action_to_take IN ('D',...

Viewing 15 posts - 4,876 through 4,890 (of 7,614 total)