Question
API‑triggered Process Model using Write to Data Store (MySQL) takes 90+ seconds for ~25 inserts into a single table
Hello Community,
I am facing a performance issue with an API‑triggered Process Model that writes data to a MySQL database using the Write to Data Store Entity smart service.
[emoticon:e7b6666c6f9742b1b7b51dddab3bb696] Scenario
- An external system invokes an Appian Web API.
- The API starts a Process Model.
- The Process Model creates a case by inserting ~25+ rows into a single database table.
- Inserts are done using Write to Data Store Entity (CDT‑based).
- The API response is sent only after the Process Model completes.
[emoticon:e7b6666c6f9742b1b7b51dddab3bb696] Issue
- Total API response time is 90+ seconds.
- The process completes successfully and returns
"Successful", but the latency is too high for synchronous API calls. - Since all records are inserted into one table, this delay seems unexpected.
[emoticon:e7b6666c6f9742b1b7b51dddab3bb696] Current Design
- API → Process Model
- Multiple Write to Data Store Entity executions (likely one per record / loop)
- Inserts are mostly sequential
- Backend database: MySQL
[emoticon:e7b6666c6f9742b1b7b51dddab3bb696] Questions
- Is it expected for Write to Data Store Entity to take this long when inserting ~25 rows into a single table?
- Does Appian open a separate transaction / commit for each Write to Data Store execution?
- Would performance improve by:
- Passing all 25 records at once in a single Write to Data Store node?
- Using a database stored procedure for bulk inserts?
- In API scenarios, is it recommended to:
- Immediately respond to the API
- And continue DB inserts asynchronously in the background?
