Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Merge and update on a table with a composite primary key extremely slow.

Open
#4,244 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, sql

Research direction

The report concerns the 2.3.232 regression in MERGE and UPDATE statements on tables with composite primary keys, but names no source files or tests. Start by reproducing the reported slowdown and compare execution time with an IDENTITY primary key; done means restoring comparable performance for composite-key MERGE and UPDATE operations.

Written by the indexing model from the issue text.

Description

Merge and update on a table with a composite primary key extremely slow.

After upgrading to the latest version, 2.3.232 merge and update statements became up to 25 times slower on a table with a composite primary key.
Had to replace the composite key with an ID (IDENTITY) column as primary key to reduce the execution time for merge and only use one WHERE condition on ID for update.

Dominant language
Java
Stars
4.6k
Forks
1.3k
Avg merge
1d 9h
Merged PRs (30d)
27

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from h2database/h2database

All issues in h2database/h2database

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.