16 Replies Latest reply: Feb 18, 2016 3:06 AM by Marcus Sommer RSS

    Performance issue with 'where exists' clause

    Jens Zibell

      Hi,

       

      I have an issue with the load of really large table. It deals with user to customer relationships and is the preparation for the section access.

       

      First of all, I load a smaller table (about 1000 rows) with users who shall be able to see everything.

      Then I load a table that has about 1 billion rows with a "where not exists (user_id)" clause,

       

      Table A:

      LOAD

           USER_ID,

           VIEW_ALL_FLAG

      FROM

      ...

      ;

       

      Table B:

      LOAD

           USER_ID,

           CUSTOMER_ID

      FROM

      ....

      Where not exists(USER_ID, USER_ID)

      ;

       

      The load takes several hours. How can I redesign the load to take shorter time?

       

      Thanks,

      Jens