Forum Replies Created

Viewing 15 posts - 91 through 105 (of 161 total)

  • RE: IDS vs GMS2

    MadAdmin,

    First of all, I updated attached scripts.

    Made them smaller to narrow down the problem.

    I agree with all your concerns.

    Join on a function, TRIM, etc. - bad ideas.

    The problem is.

    My hands...

  • RE: IDS vs GMS2

    Missing Index is only suggested in IDS INSERT plan.

    It runs fast anyway. Problem is with GMS2 INSERT query.

    There are no suggestions in GMS2 INSERT plan.

    i tried this index before. No...

  • RE: IDS vs GMS2

    What a surprise!

    As soon as I remove DISTINCT from GMS2 INSERT (second insert into temp table)

    it runs 10 seconds !

    And it inserts 20,955 rows.

    How DISTINCT can increase execution time from...

  • RE: IDS vs GMS2

    Execution Plans attached as promised...

  • RE: JOIN in date range slow

    Luis,

    After I analyzed the next slow block (let's call it "GMS2 INSERT"),

    I shifted my focus to much bigger issue (in my opinion).

    It is very similar to my original query I...

  • RE: JOIN in date range slow

    Luis,

    So what is the solution

    for

    The estimated row counts are way off

    UPDATE STATISTICS ?

  • RE: JOIN in date range slow

    Luis,

    So what should I do about

    ". . . The estimated row counts are way off, but I'm not sure if they're like that from the non-equi joins.."

  • RE: JOIN in date range slow

    Hello Luis,

    "....No, I'm just saying that if it's a cross join, you should write it as such..."

    Do you mean you would lie to see

    SELECT .....

    FROM

    a

    CROSS JOIN

    b

    style ?

  • RE: JOIN in date range slow

    Luis,

    Indexes are there.

    I didn't notice DDL script did not generate index info..

    I re-attached new DDL

  • RE: JOIN in date range slow

    Added DDL for two problematical tables...

    S_CLIENT_SHARED

    S_CLIENT_ACCOUNT_ASSOCIATION_SHARED

  • RE: JOIN in date range slow

    Thanks Luis.

    Without DISTINCT, row count is actually 20 billion something.

    Maybe that's what Estimated Row counts show ?

    To me if without DISTINCT query returns 20 billion records from 80 million...

  • RE: JOIN in date range slow

    Thanks Luis.

    So you insist CROSS JOIN is a bottleneck.. I guess.

    I actually did a test.

    I removed JOIN ON (1=1).

    But the execution time did not change at all...

    Luis,

    I didn't understand this...

  • RE: JOIN in date range slow

    regarding

    ON (1=1)

    after all maybe it's not a big deal because LAST_ANNUAL table

    is only one row (always).

    so it's not really a CROSS JOIN.

  • RE: JOIN in date range slow

    Original query:

    SELECT DISTINCT

    ACCOUNT_SHARED.SOURCE_CODE

    ,ACCOUNT_SHARED.ACCOUNT_IDENTIFIER

    INTO #COMMON_I_SS_ARRANGEMENT_LOCATION_ADDR_IDS_CURRENT_VALID_ARRANGEMENT

    FROM

    (SELECT MAX(DATA_SET.BUS_PROC_DATE)...

  • RE: JOIN in date range slow

    Folks,

    I just discovered an interesting thing.

    The original query uses DISTINCT.

    SELECT DISTINCT

    ASSOCIATION.SOURCE_CODE, ASSOCIATION.CUSTOMER_NUMBER

    . . . . . . .

    Without DISTINCT

    it returns 1.8 billion records !!

    With DISTINCT - it returns...

Viewing 15 posts - 91 through 105 (of 161 total)