DanielLeens opened a new issue, #13619: URL: https://github.com/apache/seatunnel/issues/13619
## Documentation improvement Add matching English and Chinese guidance for the pgJDBC reWriteBatchedInserts property in plain INSERT batch jobs. Explain compatible statement rewriting, logical batch sizing, partial batches, and statement grouping effects on triggers/default expressions, constraints and failures. Exclude custom SQL, conflict updates, DELETE, COPY and XA from this example. The tested 42.5.1 default is false. No SeaTunnel option, default, dependency, generated SQL, transaction, retry or checkpoint contract changes. Batch 1000 is a measurement starting point rather than one physical SQL statement or a guaranteed optimum. Preserve other URL properties and required connection/table settings. Property searches of open and closed PRs returned #13480 (conditional PostgreSQL upsert), which has a different objective. #13604 documents MySQL Connector/J statement-cache sizing, not this pgJDBC property. Primary references: [pgJDBC properties](https://jdbc.postgresql.org/documentation/use/#connection-parameters), tested 42.5.1 PGProperty.REWRITE_BATCHED_INSERTS and PgPreparedStatement.transformQueriesAndParameters. ### Full-engine evidence and limitations Pinned SeaTunnel dev 5cf050be3ffc77c0065d67d4eb8af83f24a2a620 and DataX master 5993b26cda90f3e6a4a2fd2e42843efeb770ab3d. No open runtime PR is layered onto SeaTunnel. Both complete engines run serially on the same existing 4-vCPU/16-GiB host, retaining background services, from self-hosted MySQL 8.0.35 to PostgreSQL 14.21. Both use Java 11, Connector/J 8.0.33, pgJDBC 42.5.1, maximum heap 1 GiB, parallelism/channel 1, batch 1000, plain INSERT, per-batch commit, no checkpoint and no tolerated dirty rows. Each profile includes 100,000-row warmup per tool and three million-row alternating pairs (DX/ST, ST/DX, DX/ST). Each job starts a new JVM, so warmup covers host/database rather than same-JVM JIT. All 19 values are compared by ID outside timing: numeric/decimal, Unicode/large text, NULL versus empty, date/time/timestamp and complete native binary bytes (source VARBINARY(32), target BYTEA). Target TIME(0)/TIMESTAMP(3) does not establish arbitrary temporal precision or native-LOB coverage. This fixture has no application triggers/default expressions. Elapsed time includes full engine startup, acknowledged writes, completion scheduling and normal process exit. Table preparation and exact reconciliation are excluded. DataX completion polling is explicitly 1000 ms in every profile, without row/byte throttles. These are full-job times, not isolated JDBC execution. The same MySQL source driver profile is used for both tools: rewriteBatchedStatements=true and useServerPrepStmts=false. Only the PostgreSQL target rewrite toggle differs between the tested profiles. Preconnect private-address guards plus 100 ms process-group socket auditing found only private/loopback destinations. The first two groups give both tools the same target driver setting: | Target rewrite | Pair | DataX seconds | SeaTunnel seconds | SeaTunnel throughput gain | | --- | ---: | ---: | ---: | ---: | | false | 1 | 40.637 | 47.816 | -15.01% | | false | 2 | 40.831 | 45.681 | -10.62% | | false | 3 | 39.756 | 46.532 | -14.56% | | true | 1 | 70.804 | 37.437 | 89.13% | | true | 2 | 70.941 | 38.018 | 86.60% | | true | 3 | 68.739 | 37.591 | 82.86% | DataX is faster with rewriting disabled in this fixture. Its rewrite-enabled timings must not be presented as its best performance or used alone to claim competitive superiority. The separate tool-tuned pairs below use DataX false / SeaTunnel true, each tool's faster observed setting. These driver profiles intentionally differ; all other stated conditions remain the same. | Tool-tuned pair (DX false / ST true) | DataX seconds | SeaTunnel seconds | SeaTunnel throughput gain | | --- | ---: | ---: | ---: | | 1 | 39.764 | 37.201 | 6.89% | | 2 | 40.763 | 37.863 | 7.66% | | 3 | 40.800 | 37.548 | 8.66% | Every job passed exact reconciliation. Both tools also passed a 1001-row rewrite-enabled run with batch 1000, covering a partial final batch. Results apply to these frozen versions, dataset and resource profile. They do not prove a universal speedup, arbitrary trigger/default equivalence, or a JDBC-component root cause for the complete-job difference. The guide changes no runtime or default. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
