Multiple joins vs. 1 lookup table (alternatives)

  • Hi,
    In a DataMart analysis for a CRM system, about 10 Dim tables are joined with FactTable to see if the account is also in the table (inner join). This takes a long time (even with an index on KeyCol) for large amounts of data (1 million rows per DIM). If it were not better, I would prepare a table with 10 columns to look up in this table by lookup or join, if the account exists.
    Is the idea good - or are there better solutions?
    Thanks
    Regards
    Nicole 🙂

  • info 58414 - Sunday, September 23, 2018 10:28 AM

    Hi,
    In a DataMart analysis for a CRM system, about 10 Dim tables are joined with FactTable to see if the account is also in the table (inner join). This takes a long time (even with an index on KeyCol) for large amounts of data (1 million rows per DIM). If it were not better, I would prepare a table with 10 columns to look up in this table by lookup or join, if the account exists.
    Is the idea good - or are there better solutions?
    Thanks
    Regards
    Nicole 🙂

    We don't have enough information to help you.  I'll also say that a million rows per DIM shouldn't be a problem... the problem will be in the code that uses them.

    My recommendation would be to see the 2nd link in my signature line below under "Helpful Links" and post what is requested along with an adequate description of what the code is supposed to do.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Hi, here is the Execution-Plan.
    Thanks

  • Hi, here is the Execution-Plan.
    Thanks

    Jeff Moden - Sunday, September 23, 2018 10:48 AM

    info 58414 - Sunday, September 23, 2018 10:28 AM

    Hi,
    In a DataMart analysis for a CRM system, about 10 Dim tables are joined with FactTable to see if the account is also in the table (inner join). This takes a long time (even with an index on KeyCol) for large amounts of data (1 million rows per DIM). If it were not better, I would prepare a table with 10 columns to look up in this table by lookup or join, if the account exists.
    Is the idea good - or are there better solutions?
    Thanks
    Regards
    Nicole 🙂

    We don't have enough information to help you.  I'll also say that a million rows per DIM shouldn't be a problem... the problem will be in the code that uses them.

    My recommendation would be to see the 2nd link in my signature line below under "Helpful Links" and post what is requested along with an adequate description of what the code is supposed to do.

    Hi, the Queyplan is online ...thanks

  • info 58414 - Sunday, September 23, 2018 1:03 PM

    Hi, here is the Execution-Plan.
    Thanks

    Jeff Moden - Sunday, September 23, 2018 10:48 AM

    info 58414 - Sunday, September 23, 2018 10:28 AM

    Hi,
    In a DataMart analysis for a CRM system, about 10 Dim tables are joined with FactTable to see if the account is also in the table (inner join). This takes a long time (even with an index on KeyCol) for large amounts of data (1 million rows per DIM). If it were not better, I would prepare a table with 10 columns to look up in this table by lookup or join, if the account exists.
    Is the idea good - or are there better solutions?
    Thanks
    Regards
    Nicole 🙂

    We don't have enough information to help you.  I'll also say that a million rows per DIM shouldn't be a problem... the problem will be in the code that uses them.

    My recommendation would be to see the 2nd link in my signature line below under "Helpful Links" and post what is requested along with an adequate description of what the code is supposed to do.

    Hi, the Queyplan is online ...thanks

    You'll need to explain the WHY behind the JOINs to the 10 DIM tables.   An execution plan is certainly helpful, but it can't give us the WHY, which is often critical to providing useful information.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply