I have a table defined by
CREATE TABLE document_storage (
id INTEGER NOT NULL,
PRIMARY KEY (id)
The DB Type BYTEA is used by the generated source files as byte.
The insert of 70MB content needs >40s via JOOQ records, which sems to be way too long.
DocumentStorageRecord storageRecord = jooq.newRecord(DOCUMENT_STORAGE);
If I use the example from the postgres jdbc docs, than the row is writen in <2s
ByteArrayInputStream is = new ByteArrayInputStream(content)
PreparedStatement ps = conn.prepareStatement("insert into document_storage (id, content) values (?, ?)");
ps.setBinaryStream(2, is, content.length);
I've try to configure a <forcedType> BINARY for that column but the result was the -expected- same type byte within the generated sources.
What is needed to have the same performance as in the plain jdbc example ?
How can I