Skip to main content
ankushs0002
Known Participant
February 9, 2024
Solved

Want to add to the database in smaller chunks, Need to design process

  • February 9, 2024
  • 9 replies
  • 0 views

If I have 1000 records that I want to add to the database in smaller chunks, how should I design a process to accomplish this?

I have a few potential solutions, but I'm unsure about their performance implications:

  1. Implementing a loop: In each iteration, I would send data in manageable chunks.
  2. Utilizing an XLSX file: I could create an XLSX file and then use the Excel to Database smart service to transfer the data.
  3. Using a stored procedure.

However, I need clarification on the most suitable approach in terms of performance before implementing this functionality.

Best answer by konduruc733182

Hello [mention:22441f4b76d54668b9ec7593ce03ccbd:e9ed411860ed4f2ba0265705b8793d05] 

Doing the following would not put much impact on Performance.

1. Get the data from your excel to a staging/temporary table

2. From this temp table, create a paging and get 100 records per time in an ER and use Stored procedure and write it to the actual table. 

9 replies

konduruc733182
February 9, 2024

Hello [mention:22441f4b76d54668b9ec7593ce03ccbd:e9ed411860ed4f2ba0265705b8793d05] 

Doing the following would not put much impact on Performance.

1. Get the data from your excel to a staging/temporary table

2. From this temp table, create a paging and get 100 records per time in an ER and use Stored procedure and write it to the actual table. 

stefanhelzle0001
Brainy
February 9, 2024

Is that a one-time job? If not, how often is that import triggered? Only once at a time, or can there be multiple at the same time?

In general, my best experience is: XLS->Temp DB table->Stored Procedure->Final table.

Try to avoid any looping inside Appian using expressions or processes.

ankushs0002
Known Participant
February 9, 2024

Hi [mention:126a676c85024855948336691b0a7b92:e9ed411860ed4f2ba0265705b8793d05] ,

Thanks for replying, yes i have bulk of data i don't want to send at one time i want to send data in smaller batch size. I was thinking previosly that it can be handled by looping but looping will impact the performace and i think we avoid using looping over the process