Hi,
I have a table defined by
CREATE TABLE document_storage (
id INTEGER NOT NULL,
content BYTEA,
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);
storageRecord.setId(documentRecord.getId());
storageRecord.setContent(content);
storageRecord.store();
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.setInt(1, id);
ps.setBinaryStream(2, is, content.length);
ps.executeUpdate();
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 ?
Kind reagds
Dominik
How can I