I am seeing high latencies for some really simple insert queries. I have attached screenshots of the diagnostics page as well.
For example for the following query, I see it taking about ~3.8 seconds. Its inserting about 128 rows into the table, that looks like this:
CREATE TABLE public.profile_updates (
id INT8 NOT NULL DEFAULT nextval(‘profile_updates_auto_inc’:::STRING),
profileoperation_id INT8 NOT NULL,
profile_id INT8 NULL,
“timestamp” INT8 NOT NULL,
action VARCHAR(255) NOT NULL,
details STRING NOT NULL,
CONSTRAINT “primary” PRIMARY KEY (id ASC),
INDEX profileoperation_id (profileoperation_id ASC),
INDEX profile_id (profile_id ASC),
FAMILY “primary” (id, profileoperation_id, profile_id, “timestamp”, action, details)
)
Query:
INSERT INTO profiles.profile_updates(profileoperation_id, profile_id, “timestamp”, action, details) VALUES ($1, $2, more3), (more100)
I am using jdbc batched statement to update the rows.
I see that most the latency is attributed to overhead. What exactly does overhead include and what would be the best way to optimize it if this is the root cause.