Hey I am new to Cockroach and recently started testing it out for further use.
I was trying to do a batch insert of about 300,000 rows to one table and another 300,000 upserts into another using jdbc prepared statement …and then execute batch.
It took roughly 22 mins for the whole operation …i guess about 11 mins each.
This was prepared statement
db.prepareStatement("INSERT INTO items.field_data (item_id, field_id, timestamp, user, data)
“VALUES (?, ?, ?, ?, ?)”)
This is the table I am inserting to
CREATE TABLE items.field_data (
item_id INT NOT NULL,
field_id INT NOT NULL,
data BYTES NOT NULL,
timestamp INT NOT NULL,
user STRING NOT NULL,
PRIMARY KEY (item_id, timestamp, field_id)
I am testing against a regular default cluster with 3 nodes each with 16 GB memory.
Any tips or pointers to improve the performance or something I am not doing right?