6 Replies Latest reply: Oct 30, 2017 12:21 PM by Cristina Punga RSS

    Problems with RAM memory

    olga avalos

      Hi,

       

       

      Please help me...

       

      The script that I run, shows me an error: Unknown load. From what I have observed is due to RAM problems.

       

       

      Please can you help me how I can optimize the following code:

       

       

      NoConcatenate

      fc_Core_Cuenta_tmp3:

      Load

      *,

      If(

                Match(Right(Left(Cuentas_Nivel6,8),2),'01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60',

                '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90'),Left(Cuentas_Nivel6,8)

            )

            as Cuentas_Nivel5

      Resident fc_Core_Cuenta_tmp2;

      Join

      Load

      Cuenta_Long8 as Cuentas_Nivel5,

      Valor_Cuenta as Valor_Cuenta5

      Resident fc_Core_Cuenta_tmp;

      Drop Table fc_Core_Cuenta_tmp2;

       

       

       

      Upload the RAM when I insert the "JOIN"

        • Re: Problems with RAM memory
          Cristina Punga

          Are you sure you want a full join? JOIN statement is a full join.

          Maybe an inner join would save the situation if it actually is a RAM issue. Or at least a left or right join (depending on what you want to keep).

          Also, I think you can move Drop Table fc_Core_Cuenta_tmp2; just before the join statement, as you will save some space with this table that you don't invoke anymore.

          • Re: Problems with RAM memory
            Cristina Punga

            What I meant earlier with fc_Core_Cuenta_tmp2 is that you already drop it in the last line of code that you pasted. So instead of dropping it at the last moment, you can drop it just before the JOIN statement (see below adjusted script) because the JOIN code doesn't refer to fc_Core_Cuenta_tmp2 anymore, but to

            fc_Core_Cuenta_tmp as I see.

             

             

            NoConcatenate

            fc_Core_Cuenta_tmp3:

            Load

            *,

            If(

                      Match(Right(Left(Cuentas_Nivel6,8),2),'01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60',

                      '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90'),Left(Cuentas_Nivel6,8)

                  )

                  as Cuentas_Nivel5

            Resident fc_Core_Cuenta_tmp2;

            Drop Table fc_Core_Cuenta_tmp2;  //moved here

            Join

            Load

            Cuenta_Long8 as Cuentas_Nivel5,

            Valor_Cuenta as Valor_Cuenta5

            Resident fc_Core_Cuenta_tmp;

            Drop Table fc_Core_Cuenta_tmp2;

             

             

             

            So, by doing this, you may end up with some saved RAM.

            • Re: Problems with RAM memory
              Carlos Silva

              Maybe a Load Distinct on the Join?

               

              CS