Reputation: 305
I have a table with "BigInt"(int8) primaryKey column, insert on this table is extremely slow, and it's keep degrading as the number of rows increases.
Some more details:
The issue seems with BiGInt column itself, when we change the column type from BigInt to varchar, slowness disappeared, 25k records inserted in one minute.
am I doing anything wrong with BigInt column ? why BigInt type makes insert so slow ?
any insights and help is appreciated.
Thanks!
Upvotes: 1
Views: 1747
Reputation: 305
It was caused by wrong mapping:
Postgresql:BingInteger(int8) --> Java.math.BigInteger
❌
Correct Mapping
Postgresql:BingInteger(int8) --> Java.lang.Long
✅
Got hint from this post: mailing-list
Upvotes: 3