Pentaho

 View Only

 Why step insert/update in spoon is so slownly?

  • Pentaho
  • Kettle
  • Pentaho
  • Pentaho Data Integration PDI
Blanca Santos's profile image
Blanca Santos posted 05-23-2019 16:12

Hi,

I´ve to use the step insert/update in several transformations made with Pentaho Data Integration. I need to updatad tables with more then 2 millions of registers. I´ve noticed that this step is so slownly, and I don´t know how to solved it.

Do you know why is so slownly? Do you know how to solved it?.

Thanks in advance.

Regards,

Blanca.


#Pentaho
#PentahoDataIntegrationPDI
#Kettle
Paulo Pires's profile image
Paulo Pires

Hi Bianca,

Generally the insert/update is slower than just insert because it checks the existing values on the DB.

There is one option that you could try, I think the Transaction Size (Commit) by default is 100, but you can increase this value and check if the performance improves.

Best regards

Johan Hammink's profile image
Johan Hammink

What is the update / insert ratio? When there are not that much updates and a lot of inserts and there is a primary key you can use the solution discribed in the help of the insert/update step.

Insert - Update - Pentaho Data Integration - Pentaho Wiki      

Note: Due to the extra lookup this step performs slower then a normal Table Output step. Another option is to use the Table Output step with error handling what is described in the chapter Step Error Handling. "If you put a primary key on the ID (in this case the customer ID) the insert into the table causes an error. Because of the error handling you can pass the rows in error to the update step. Preliminary tests have shown this strategy of performing upserts to be three times faster in some situations (with a low updates to inserts ratio)."

Blanca Santos's profile image
Blanca Santos

Hi Paulo,

I´ve changed de Commit size into the step to 1000 but nothing changed, it still been slownly.

Regards.

Blanca Santos's profile image
Blanca Santos

Hi Johan,

Thank´s, I´m going to try your solution.

The maximun registers modified or new probably will be 60,000. 

Regards.