Slow Data Insertion in Cloud Berry #1875
Replies: 1 comment
|
Hi @TanmayK2000 👋 The math is the clue here: Even a naive row-by-row 1. NiFi probably shouldn't be in this path. You're moving data between two tables in the same warehouse. Right now every row is read out of Cloudberry, pushed through NiFi's JVM and FlowFile repository, and written back over JDBC — 17 million round trips for what is one server-side statement: INSERT INTO target SELECT * FROM source;That runs fully parallel across all segments with no data landing on the coordinator. Expect minutes, not days. If NiFi must stay for orchestration, have it issue that statement rather than move the rows. 2. If the target is an AO/AOCO table, per-row commits degrade toward O(n²). Each write transaction into an AO table takes a serializing lock and sequentially scans This is a hypothesis, but there's a fast test that doubles as immediate relief: VACUUM target_table;If throughput jumps, that's your bottleneck. (Related: was the first million rows noticeably faster than the last? Progressive slowdown would confirm it.) If you're stuck with JDBC: disable autocommit, batch 1,000–10,000 rows per commit, add To confirm the diagnosis, could you share:
Short version: this looks like an OLTP-style row-by-row write pattern against an MPP warehouse, not a Cloudberry limit. |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I am using Apache CLoudberry Datawarehouse for data insertion with the help of Apache Nifi i noticed that data insertion in Datawarehouse is very slow for eg i am transfering 17 million data from one table to other table which in Datawarehouse the insertion process is taking place from last 3 days and till now only 8 million data is transfer why insertion is slow any idea ??
All reactions