Conceptio › Archive › arXiv CS
arXiv CS open access

From Code Changes to Slowdowns: An Empirical Study of Performance Regressions in Open-Source Database Kernels

Xueli Sun et al. · arxiv_cs
arXiv CS · Papers
Open Source ↗Direct PDF ↓
data-managementdatabasessqlstorage
Database kernels change continuously, and a change that leaves every query result correct can still make a workload far slower. Because results stay correct, result-checking tests cannot reveal such regressions, and although several detectors target database performance problems, little is known abo
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

1

From Code Changes to Slowdowns: An Empirical Study of Performance Regressions in Open-Source Database Kernels

arXiv:2611.36905v1 [cs.SE] 27 Nov 2026

Xueli Sun and Shuangxiang Kan Abstract—Database kernels change continuously, and a change that leaves every query result correct can still make a workload far slower. Because results stay correct, result-checking tests cannot reveal such regressions, and although several detectors target database performance problems, little is known about the regressions that code changes introduce. We present, to our knowledge, the first cross-system study of code-change-induced performance regressions in database kernels. Scanning over 2.1 million commits and related reports of nine open-source systems, from embedded SQLite to distributed TiDB, we identify 668 publicly confirmed regression families in kernel code and analyze where they occur, how changes cause them, and how completely they can be traced to code. We find that regressions span the kernel: query optimization is the largest module (27.4%), but execution and storage together account for more (36.8%), and the leading module differs by architecture. Extra work on a hot path, plan changes, and concurrency or coordination changes cause 61.8% of families. Over 95% of families map to changed code, but only 43.7% identify the introducing change, a subset that over-represents plan changes. Replaying 22 regressions on historical builds, we evaluate nine configurations of four detectors, including APOLLO and AMOEBA, and three developer benchmarks. Most timing alerts are slowdowns that the regression’s fix does not remove; the detectors reach only seven regressions and the benchmarks none, mainly because their workloads never contain the trigger. These results call for change-directed testing that varies the workload dimensions a change puts at risk. Index Terms—database systems, performance regression, empirical study, program analysis, test generation, software evolution

✦

1

I NTRODUCTION

D

ATABASE management systems (DBMSs) are a critical component of modern data-intensive applications [1]. More than one trillion SQLite databases are estimated to be in active use [2], and PostgreSQL and MySQL were the databases most used by professional developers in the 2025 Stack Overflow survey [3]. For the applications built on a DBMS, performance matters alongside correctness. Response time determines how quickly an application can take in new information and act on it [1], so applications set latency targets, size their hardware, and tune their queries on the assumption that a query that is fast today will stay fast after the next upgrade. In dependability terms, a system’s function covers performance as well as functionality, and correct results delivered too late constitute a timing failure [4]. Database kernels, however, change continuously, and a change to the optimizer, the executor, the storage engine, or synchronization can slow down a workload without altering a single query result. We call such a slowdown a code-change-induced performance regression. Because results

• • •

X. Sun is with Nanjing University of Posts and Telecommunications, Nanjing, China. E-mail: sunxueli@njupt.edu.cn S. Kan is with Singapore Management University, Singapore. E-mail: sxkan@smu.edu.sg (Corresponding author) This work is supported by the National Natural Science Foundation of China (Nos. 62402241, 62372248, and 62272244), the Natural Science Foundation of the Jiangsu Higher Education Institutions of China (No. 24KJD520006), Natural Science Research Start-up Foundation of Recruiting Talents of Nanjing University of Posts and Telecommunications (No. NY223189), Natural Science Foundation of Jiangsu Province (No. BK20200753), Jiangsu Postdoctoral Science Foundation Funded Project (No. 2021K096A), and the Open Project of State Key Laboratory of Internet Architecture (No. HLW2025MS24).

stay correct, result-checking tests cannot reveal it. Public reports show how severe such regressions can be. A planner heuristic for star-schema queries made a user’s SQLite query that took 1.3 s on release 3.46.1 run for more than an hour on 3.47.2 [5], [6]; a costlier hash function and InnoDB functions that were no longer inlined made join queries about 18% slower on MySQL 8.0.33 than on 8.0.28 [7]; and PostgreSQL semaphores that shared cache lines caused contention on many-CPU systems until release 10.5 padded them [8]. Regressions are also costly to handle after release. Users who encounter one after an upgrade often cannot report it, because the triggering query is complex and depends on their own database, and developers must then spend considerable effort localizing the cause [1]. Plan regressions are painful enough in production that commercial systems store earlier plans and revert to them [9], and Meta’s pre-production testing platform must detect regressions as small as 0.01% [10]. Catching a regression before release is difficult, however. Its trigger can involve SQL shape, schema, statistics, data scale, cache state, concurrency, topology, or configuration; in the optimizer alone, cardinality estimates are routinely wrong and can lead to poor join orders [11]. Even with the right workload, the slowdown must be separated from measurement noise, which in cloud environments can exceed 100% [12]. Database projects combine unit tests, projectspecific performance tests, and workloads such as TPC-C or Sysbench, but replaying broad benchmarks at commit frequency is expensive, and a fixed workload exercises only a small part of a kernel’s behavior. Research detectors such as APOLLO [1], AMOEBA [13], CERT [14], and more recent

2

tools [15], [16], [17] find performance bugs automatically, but most derive their oracles from optimizer behavior and examine one version at a time. What is missing is empirical knowledge of the regressions themselves. To our knowledge, no study has characterized the regressions that code changes introduce across database architectures, so two questions that shape detector design remain open. The first is what these regressions look like: a population dominated by optimizer changes would favor plan-sensitive SQL generation, whereas one rich in hot-path, storage, and synchronization regressions would require scale, cache, I/O, and concurrency dimensions and latency or throughput oracles. The second is what ground truth exists: evaluating a commit-level detector requires the introducing change, but many reports identify only the fix, and inferring the former from the latter, as SZZ-style algorithms do, does not always recover it [18], [19], [20]. This paper presents an empirical study of publicly confirmed code-change-induced performance regressions in nine open-source database kernels: SQLite, PostgreSQL, DuckDB, TiDB, MySQL, MariaDB, CockroachDB, OceanBase, and ClickHouse. We scan their public histories, which comprise more than 2.1 million commits and check-ins, together with their issue trackers, mailing lists, and release notes. Our unit of analysis is a regression family: all public artifacts that share one code cause, so that a report, its backport, and its fix count once. We separate regressions acknowledged or fixed upstream, regressions reproduced locally, and performance costs that maintainers explicitly accepted for another goal. We ask four research questions: RQ1

RQ2 RQ3

RQ4

Where? Which kernel modules contain publicly confirmed code-change-induced performance regressions, and how does the composition vary across database architectures? Why? Which code-change mechanisms cause the observed regressions? What evidence? How completely can a regression family be linked to an introducing/fixing change, public evidence, and source locations? Detected? Can existing detectors and developer benchmarks expose these regressions, and why do they miss?

RQ1–RQ3 are answered from the corpus. RQ4 is answered by a dynamic evaluation on 22 evaluation cases derived from the corpus and replayed on exact historical builds. Our main findings are as follows. •

•

•

Regressions are not mainly an optimizer problem (RQ1). Of 668 kernel families, query optimization is the largest module (27.4%), but query execution and storage I/O together account for more (36.8%), and the leading module differs by architecture. Plan-only testing cannot cover this population. Three mechanisms dominate (RQ2). Extra work on a hot path, plan selection or transformation changes, and concurrency or coordination changes cause 61.8% of families. Plan changes mostly stay in the optimizer, but hot-path work spans every module, so no single performance test covers them. Introducing changes are often unknown (RQ3). Over 95% of families can be localized to changed

•

•

files, functions, or hunks, but only 43.7% identify the introducing change, and this subset over-represents plan changes and under-represents hot-path work. Commit-level evaluations must choose their ground truth explicitly and must not relabel a fix as the cause. Existing detectors rarely reach the studied regressions (RQ4). Nine detector configurations, including APOLLO and AMOEBA, and three developer benchmarks raise many timing alerts, but re-measuring each alert across the fixing commit attributes alerts to the studied family in only 7 of the 22 cases, and the benchmarks attribute none. Most misses occur because workloads never contain the triggering construct; timer resolution explains few of them. Tests should vary the suspected trigger (Section 6.3). The causal evidence maps a changed code region to the workload dimensions and oracles needed to expose it. Data scale and SQL shape are the most common dimensions, but neither dominates, so generation should be conditioned on the change rather than replay one workload after every commit.

This paper makes three contributions: •

•

•

A corpus of 668 regression families from nine database kernels, collected by a source-native protocol adapted to each community’s workflow and linked, where available, to introducing and fixing changes, source locations, triggers, and test hypotheses. A cross-system characterization of affected modules, change mechanisms, confirmation status, and evidence completeness, together with the requirements these data impose on change-risk analysis, directed test generation, performance oracles, and leakagefree evaluation. A dynamic evaluation of nine detector configurations and three developer benchmarks on 22 evaluation cases replayed on exact historical builds of SQLite, DuckDB, PostgreSQL, and TiDB. It attributes alerts to regression families by re-measuring them across the fixing commit and separates misses from inapplicable or incompatible cases.

Sections 2 and 3 cover related work and the study design, Section 4 answers RQ1–RQ3, and Section 5 reports the dynamic evaluation (RQ4). Sections 6 and 7 discuss implications and threats to validity, and Section 8 concludes.

2

BACKGROUND AND R ELATED W ORK

2.1

Performance Bug and Regression Studies

Performance regressions are slowdowns or resourceefficiency losses caused by a software change relative to a relevant baseline. General software studies show that performance bugs frequently arise from inefficient computation, repeated work, synchronization, and misunderstanding of library or system behavior [21]. Repository studies compare performance bugs with other bugs and show that they differ in how they are discovered, reported, and fixed [22], [23]. Han and Yu examine 113 performance bugs from Apache, MySQL, and Firefox with a focus on the role of configuration [24]. In long-running systems, agingrelated bugs cause performance to decline over execution

3

time, and recent work predicts them across projects [25]. These studies characterize performance bugs regardless of whether a prior change introduced them. Database kernels add optimizer decisions, physical operators, storage policies, and distributed coordination to this space. Closer to our unit of analysis, Chen and Shang benchmark 1,126 Hadoop and 135 RxJava commits to identify and analyze performance-regression-introducing changes [26]. Ren et al. trace the performance evolution of Linux core operations across 41 kernel versions and attribute most observed slowdowns to a small number of kernel changes [27]. For distributed storage and computing systems, TaxPerf classifies 99 performance bugs from five systems into six root-cause categories [28]. These studies either measure regressions in a few non-database code bases or analyze performance bugs without identifying the introducing change. To our knowledge, no prior study characterizes publicly confirmed code-change-induced regressions across database kernels while separating introducing from fixing revisions. 2.2

Performance Regressions in Practice

Plan regressions are a recognized production problem: commercial systems store earlier plans and revert to them [9], and regressions on some queries still hinder the adoption of learned optimizers [29]. Storage engines raise their own diagnosis problems, as performance issues in MongoDB’s WiredTiger illustrate [30]. Outside databases, large operators invest heavily in catching small regressions. Meta’s pre-production testing platform must detect regressions as small as 0.01% [10], and its production monitoring tracks about 800,000 time series to catch regressions caused by code or configuration changes [31]. One year of Firefox performance testing raised 17,989 alerts that had to be triaged [32]. Performance testing in open-source projects, by contrast, lacks accepted best practices [33]. Measurement noise is a further obstacle: in cloud environments, benchmark variability ranges from negligible to more than 100%, and slowdowns of 10% or less become detectable when the compared versions run on the same machines in randomized order [12]. Our dynamic evaluation follows this design by interleaving versions on one host (Section 5.1).

faster flipped execution as a performance issue; it found 21 previously unknown issues in four DBMSs [17]. Recent work also studies query performance regressions caused by practical index-tuning decisions [34]. Most of these techniques derive their oracles from optimizer behavior, such as equivalent rewrites, cardinality estimates, disabled optimizations, or forced branches, and all except APOLLO examine one version at a time instead of a code change. Our study complements them by characterizing what a change-directed detector should cover, including execution, storage, and coordination regressions that optimizer-derived oracles are not designed to expose. 2.4

2.5 2.3

Performance Testing of Database Systems

APOLLO combines workload generation, version comparison, and statistical debugging; it reported ten regressions in SQLite and PostgreSQL, seven acknowledged by developers [1]. AMOEBA mutates a query into an equivalent form and treats a substantial timing divergence as a potential performance bug [13]. CERT generates queries whose estimated cardinality should increase under a controlled transformation and flags plan costs that violate the expected relation; its evaluation found 13 issues across three DBMSs, nine confirmed [14]. PUPPY compares a fully optimized plan with plans in which selected optimizations are disabled; it reported 62 performance degradation bugs in five DBMSs, 54 confirmed as previously unknown [15]. Hulk searches for data-volume-sensitive performance cliffs caused by costbased optimization and reported 135 anomalies in six DBMSs, 129 confirmed as new bugs [16]. QueryZen flips optimization-related code branches and treats a significantly

Change-Aware Performance Regression Testing

Commit-level approaches aim to avoid running every performance test after every change. PerfScope analyzes the performance risk of a code change to prioritize performance regression testing [35]. PerfRanker prioritizes performance regression tests for collection-intensive software [36], and PerfJIT predicts at the test level whether a commit introduces a performance regression [37]. In database continuous integration, MongoDB applies change-point detection to continuous performance measurements [38], and BIPeC combines Bayesian inference with PELT change-point detection to identify regressions in SAP HANA test measurements [39]. These approaches select or prioritize existing tests, or detect regressions after measurement; they do not establish which workload dimensions a test must vary to trigger a given class of database regression. Our corpus provides such evidence (Section 6.3) and task-specific ground truth for evaluating commit-level detection. Such ground truth needs the introducing change, whereas many public reports identify only the fixing commit. Inferring the former from the latter, as the SZZ algorithm does [18], assumes that the lines changed by a fix introduced the bug. This assumption does not always hold [19], and an evaluation on developer-labeled pairs in the Linux kernel shows that some introducing commits cannot be traced this way at all [20]. We therefore never infer an introducing revision from a fix (Section 3). Database Testing and Bug Studies

Database testing has advanced rapidly for correctness. Pivoted Query Synthesis constructs queries around a pivot row [40]; NoREC compares an optimized query with a nonoptimizing reference form [41]; and Query Plan Guidance steers generation toward new plans [42]. Coverage-guided fuzzing is also widely used to find DBMS bugs, and recent work makes its coverage feedback more accurate and adds test-case trimming [43]. These methods motivate plan- and transformation-aware test generation, but their oracles do not identify performance degradation. A recent study of 777 bugs in three relational DBMSs provides a broad taxonomy of database failures [44]. BugForge collects 37,632 reports from four systems to support DBMS testing [45]. Outside databases, a study of 3,555 bug reports from three deep learning frameworks classifies faults by their triggering conditions [46]. Unlike these general bug corpora, our study focuses on performance degradation introduced by code changes and records, for

4

TABLE 1 Unified study corpus. “All” includes confirmed families, adjacent components, and terminal evidence-insufficient records.

System

All

Confirmed

Kernel

Adjacent

SQLite PostgreSQL DuckDB TiDB MySQL MariaDB CockroachDB OceanBase ClickHouse

190 149 35 165 103 41 33 29 66

91 149 35 165 103 41 33 29 66

87 143 35 136 102 41 32 27 65

4 6 0 29 1 0 1 2 1

Total

811

712

668

44

TABLE 2 History coverage and adjudicated candidate rows.

System

S TUDY D ESIGN

3.1

System Selection and Snapshot

Table 1 summarizes the corpus. We selected systems to cover embedded (SQLite), traditional client/server (PostgreSQL, MySQL, MariaDB), analytical/vectorized (DuckDB, ClickHouse), and distributed SQL or NewSQL-style systems (TiDB, CockroachDB, OceanBase). They also differ in implementation language and public workflow, making a single issue-only mining strategy inappropriate. The snapshots were frozen between August 28 and 30, 2026.

3.3

Inclusion, Exclusion, and Status

We define a candidate as a code-change-induced performance regression when a source change causes a measurable or explicitly reported degradation in latency, throughput, resource use, or scalability relative to an earlier revision. A family is confirmed when at least one of the following holds:

1,603 43,597 2,925 8,127 9,945 9,490 24,316 864 23,127

2,108,623

123,994

High-recall retrieval and cross-link expansion

Public channels of nine DBMSs

Excluded

Is a regression?

No

Yes

Evidence-insufficient

No

Confirmed?

Step 1: Collection

Step 2: Inclusion and exclusion

Yes

Merge into causal families Adjacent component

No

Kernel path? Yes

Step 3: Family construction and coding

Code status, module, mechanism, and locations Kernel regression families

Fig. 1. Corpus construction. Evidence-insufficient records and adjacentcomponent families remain in our ledger.

1)

Source-Native Collection

Figure 1 shows the collection pipeline. For each project, we first enumerated its native public sources: Git or Fossil history, issue and pull request trackers, comments, mailing lists or forums, release notes, and, where relevant, CommitFest or bug-tracker records. High-recall queries combined performance terms (e.g., regression, slower, throughput), causal terms (e.g., introduced, since, bisect), and resolution terms (e.g., fix, revert). We followed cross-source links and commit identifiers rather than treating a keyword hit as evidence. Across the nine histories (Table 2), we scanned 2,108,623 Git commits or Fossil check-ins. Project-specific collectors yielded 123,994 candidate rows for adjudication. We do not add these quantities to issue, comment, or release counts, because their units overlap and differ by source. They describe the search boundary, not regression prevalence.

36,848 104,376 95,325 326,263 420,215 317,683 227,897 44,835 535,181

Total

2) 3.2

Candidates

SQLite PostgreSQL DuckDB TiDB MySQL MariaDB CockroachDB OceanBase ClickHouse

each regression, the causal chain, the performance mechanism, and the workload dimensions needed to trigger it. We also cover nine systems and explicitly separate accepted trade-offs from repaired regressions. Studies of performance anti-patterns in ORM-based web applications [47] address a different layer: the application code that issues queries rather than the kernel that executes them.

3

Commits/check-ins

3)

an upstream developer statement, fix, or revert explicitly connects a code change to the degradation; the upstream evidence identifies affected revisions and our differential experiment reproduces the degradation; or maintainers explicitly acknowledge a performance cost accepted for correctness, security, memory use, or another engineering objective.

We exclude ordinary optimizations without a prior regression, benchmark noise, pure correctness failures, environment-only failures, and slowdown reports that cannot be connected to a code change. The 99 unresolved SQLite records are terminal evidence-insufficient exclusions. The 668-family main corpus contains 541 upstreamconfirmed regressions, seven locally reproduced regressions, and 120 acknowledged trade-offs. We retain the last group because it describes performance consequences that commit-level testing should surface, but report it separately: an accepted cost is not a “fixed performance bug.” Fortyfour confirmed families in connectors, clients, or other adjacent components remain in our ledger but are excluded from kernel distributions. 3.4

Family Construction and Coding

Our unit of analysis is a causal family, not a public artifact. Reports, backports, release-note entries, reverts, and fixes

3.5

Integrity Checks and Analysis

The unified build performs machine-checkable invariants before emitting results: global record identifiers must be unique; per-system source and output counts must agree; all confirmed kernel records must have a title, module, and mechanism; and the partitions must be complete. The current audit verifies 811 = 668 + 44 + 99: main kernel families, adjacent-component families, and terminal evidenceinsufficient records, respectively. It also executes each of the nine project-level audits. Aggregate values in this paper are regenerated from the machine-readable ledger rather than transcribed from case narratives. Our analysis is descriptive. The collected families are an observed public population under heterogeneous reporting processes, not a random sample from an unknown defect population. We therefore report counts and within-system proportions and avoid null-hypothesis tests whose sampling assumptions would mislead. Cross-system differences identify coverage requirements rather than rank systems. 3.6

Experimental Environment

All experiments in this paper run on one Ubuntu 22.04 server with two 96-core AMD EPYC 9654 processors and 1 TB of memory. Each revision is built from upstream source as an optimized build with GCC 11.4, Clang 14, or Go 1.19, and all revisions of a case use the same toolchain and flags. Each revision runs in a fresh, private database instance, and timed processes are pinned to fixed physical cores.

4

S TUDY R ESULTS

4.1

RQ1: Affected Kernel Modules

Figure 2 gives the primary-module distribution, overall and by system. Query optimization is the largest individual category (183, 27.4%), so optimizer behavior is a major source of regressions, but it does not account for a majority. Query execution (124) and storage I/O (122) together contribute 246 families (36.8%), and adding concurrency and transactions

QL (10 2) ar iaD B( Co 41 ) ck ro ac hD Oc B( ea nB 32 ) as e Cl ( 2 ick 7 ) Ho us e( 65 Al ) l( 66 8)

Query optimization

43

36

7

54

19

3

3

3

15

183

Query execution

18

20

14

13

12

8

3

13

23

124

Storage I/O

12

30

11

29

22

7

1

10

122

Concurrency/txn.

1

35

1

1

3

51

Other core

5

10

2

7

44

Schema/catalog

2

Replication/dist.

3

Types/expressions

8

7

1 1

8

M

M

yS

Ti

DB (

13 6)

)

(14

(35 DB

SQ L

Du

ck

(87 )

re

te 50

Li

25

Po

0

stg

share of column (%)

SQ

are merged when their links, commit identifiers, and descriptions establish a shared code cause. Each family retains all source references, permitting the merge to be audited. We map project-specific labels into two normalized dimensions. The primary module describes where the regression manifests (e.g., query optimization, query execution, storage I/O, or concurrency/transaction). The change mechanism describes how behavior worsened (e.g., extra hotpath work, plan selection, or coordination). Original project labels and multi-module context are preserved even though aggregate tables use one primary value. The codebook was refined iteratively, then applied with deterministic normalization rules so the aggregate dataset can be regenerated. Every family also receives a targeted test hypothesis derived from its causal evidence. For code mapping, introducing and fixing revisions are resolved against the read-only source mirrors. We record changed files, enclosing functions when recoverable, and diff-hunk context. A fixing revision is never inferred to be the introducing revision. This distinction determines which subsets are valid for change-prediction experiments.

3)

5

2

4

12

2

2

22

8

1

6

40

9

12

2

4

30

11

27

Session/protocol

10

4

Observability

5

6

2 1

4 4

Memory/resource Data movement

2

1

1

18 2

18

5

9 2

Fig. 2. Primary modules of the 668 kernel families. Numbers are family counts; shading is the share within each column, a system or the whole corpus (All). Blank cells are zero.

raises this share to 44.5%. A detector that observes only plan changes would miss much of the corpus. The composition also reflects architecture. Optimizer regressions account for 43/87 SQLite families (49.4%) and 54/136 TiDB families (39.7%). PostgreSQL has a broader concentration in concurrency/transactions (35/143, 24.5%) and storage (30/143, 21.0%). Storage is the largest category in MySQL (29/102, 28.4%) and MariaDB (22/41, 53.7%). Query execution leads in DuckDB (14/35, 40.0%), OceanBase (13/27, 48.1%), and ClickHouse (23/65, 35.4%). Grouping the systems by architecture (Section 3) shows that the leading module changes with architecture. In the embedded engine, the optimizer accounts for about half of the families (43/87, 49.4%). The three client/server systems regress most often in storage I/O (81/286, 28.3%), followed by query optimization (20.3%), query execution (14.0%), and concurrency and transactions (12.9%). In the two analytical engines, query execution leads (37/100, 37.0%). In the three distributed systems, most regressions lie in the SQL layer, led by query optimization (60/195, 30.8%), query execution (14.9%), and schema/catalog (14.4%), whereas the replication/distributed module contributes only 13 families (6.7%), fewer than the 17 replication families of the client/server systems. A detector that targets several systems must adapt its testing dimensions to the code region and the architecture, and a detector for distributed systems needs SQL-level workloads as much as cluster-level ones. Three cases show why. In MariaDB, change MDEV-23855 made InnoDB scan an ever longer list of closed tablespaces whenever the open-file limit (innodb_open_files) was reached; with tens of thousands of tables, SHOW TABLE STATUS became hundreds of times slower, and a dump of 600 schemas grew from 2:45 to 27 minutes until fix 3f75d8b2 kept open tablespaces at the head of the list. In DuckDB, commit 19795040 rewrote the Top-N operator around a heap of sort keys, and queries with a large OFFSET or LIMIT took about 6.9 s instead of 0.86 s until fix 8e2c944a brought them to 0.77 s. In CockroachDB, whose catalog descriptors are read from the key-value layer, release 23.1 also fetched comments and zone configurations by

share of row (%) 80

Qu

40

Qu

0

er yo pt im er y Sto exe izat cu ion ra g Co e I/ tion nc O u Ot rre n he r c cy/ txn Sc o he re . m Re a/c pl a ta i Ty catio log pe n s/ /di Se e ssi xpr st. e o Ob n/p ssio n r se rv otoc s M a em bili ol ty o Da ry/ r ta m esou ov em rce en t

6

Extra hot-path work (181) 19

57

36

Plan change (140) 119

9

7

1

22

13

2

13

6

2

1

5

Concurrency/coord. (92)

4

4

23

45

4

1

1

Algorithm/data struct. (60)

4

22

11

4

10

1

1

7

Memory/data movement (52)

5

15

10

1

1

2

1

11

2

I/O/buffering (44)

2

8

30

1

1

1

1

5

3

1

6

3

1

1

3

22

Metadata/schema (22) Statistics maint. (21) 21

9

Distributed comm. (19) Other control (14)

6

3

3

2

Explicit trade-off (13)

3

3

2

2

Instrumentation (9)

2

Parallelism (1)

1

1

2

10

1 6

Fig. 3. Primary mechanism (rows) by primary module (columns) of the 668 kernel families. Numbers are family counts; shading is the share within each row. Blank cells are zero.

point lookups, so a pg catalog introspection query from Django’s test suite took 1–2 s instead of milliseconds; fix eb8bdebe switched to range scans. None of these regressions changes a query plan, and each depends on a dimension that an ordinary benchmark holds fixed: the number of tables, the OFFSET, or the size of the catalog. Accepted trade-offs are also unevenly spread. They make up 44.4% of session/protocol families (8/18), 35.0% of schema/catalog families (14/40), and 29.6% of types/expressions families (8/27), but only about one tenth of query execution (13/124) and storage I/O (12/122) families. For example, TiDB pull request #26905 made a USE statement apply to the following statements of a multi-statement request, and its authors declared that the fix consumes more CPU because it disables the point-plan cache in some edge cases. A detector for the former modules will often report slowdowns that maintainers accepted, so it must separate accepted costs from defects (Section 6.4). Answer to RQ1: Regressions occur throughout the kernel. Query optimization is the largest module (27.4%), but query execution and storage I/O together account for more (36.8%). The leading module depends on the architecture: query optimization in embedded and distributed systems, storage I/O in client/server systems, and query execution in analytical engines. Testing plan changes alone cannot cover these regressions. 4.2

RQ2: Causal Mechanisms

Figure 3 reports the normalized change mechanisms. The largest class is extra or repeated work on a hot path (181, 27.1%). It includes new checks inside tuple loops, redundant expression evaluation, and repeated metadata or system calls. Plan-selection or transformation changes follow (140, 21.0%), then concurrency or coordination changes (92, 13.8%). These three mechanisms cover 413 families (61.8%). A module label does not determine the mechanism. Plan changes are concentrated, with 119 of 140 (85.0%) in query

Introducing commit 9ca67658d execExpr.c: ExecBuildHash32Expr() - scratch.resvalue = &state->resvalue; - scratch.resnull = &state->resnull; + if (i == list_length(hash_exprs) - 1) { + scratch.resvalue = &state->resvalue; final key + scratch.resnull = &state->resnull; + } else { + scratch.resvalue = &iresult->value; earlier keys + scratch.resnull = &iresult->isnull; + } Fix 60826a352d execExprInterp.c: EEOP_HASHDATUM_FIRST_STRICT if (fcinfo->args[0].isnull) { earlier key: iresult only *op->resnull = true; *op->resvalue = (Datum) 0; + state->resnull = true; expression is NULL + state->resvalue = (Datum) 0; EEO_JUMP(op->d.hashdatum.jumpdone); } Impact: with at least ten equality keys and frequent NULLs, 3.5 ms before, 20,843 ms after (5,948×), and 3.4 ms after the fix.

Fig. 4. A PostgreSQL hash-join regression and its fix. A NULL in an earlier join key marks only the intermediate result NULL, so the tuple enters the hash table but never matches. The fix also covers NEXT32_STRICT. Gray notes are ours; we omit comments and an assertion.

optimization, whereas extra hot-path work appears in all 12 modules, led by query execution (57) and storage I/O (36). Concurrency or coordination changes split between concurrency and transactions (45) and storage I/O (23). In the other direction, 64 of the 183 optimizer-module families (35.0%) are not plan changes; statistics maintenance (21) and hot-path work (19) are the largest of these. Mechanisms also vary with architecture. Concurrency or coordination changes make up 21.0% of client/server families but only one SQLite family, and all 22 metadata/schemamaintenance and all 19 distributed-communication families come from TiDB. A statistics change can add optimizer-time work and alter the eventual plan, and a synchronization change can affect latency, throughput, and CPU at once, so a module label alone is a weak guide to test strategy. A detector needs predictions for the module, the mechanism, the likely metric, and the triggering dimensions. Four cases illustrate the range: Plan transformation. SQLite check-in 198b3e33 changed LEFT JOIN view flattening. For the preserved reproducer, the regression replaced a primary-key lookup with a full scan and increased virtual-machine steps by about 69.5×; fixing check-in dc9f025d restored the plan. Input-sensitive hot path. PostgreSQL change 9ca67658d caused a multi-key hash semi join to retain ineffective tuples when a non-final key was NULL (Figure 4). With high NULL frequency and at least ten equality keys, local measurements show 3.504 ms before the change, 20,843.143 ms after it, and 3.439 ms after fix 60826a352d—a 5,948× regression relative to baseline. The trigger is far narrower than a generic join benchmark. Algorithmic storage behavior. PostgreSQL commit b2a5545 introduced repeated stat() calls while recycling WAL segments, yielding O(N 2 ) behavior in the number of segments. Fix 5ae1572993 changed the maintenance path. Here, neither SQL equivalence nor a plan oracle is sufficient; the directed test must scale WAL-segment count and observe system calls or maintenance latency. Code layout. Layout itself can be causal: PostgreSQL change 6150a1b0 enlarged BufferDesc on some platforms so instances crossed a 64-byte cache-line boundary, producing

7

TABLE 3 Evidence completeness by system. Values are counts, not percentages. System

Kernel Intro.

Fix Public Files Func./hunk

SQLite PostgreSQL DuckDB TiDB MySQL MariaDB CockroachDB OceanBase ClickHouse

87 143 35 136 102 41 32 27 65

82 37 69 132 23 30 85 72 12 76 4 40 12 32 0 27 5 65

62 100 35 136 102 41 32 27 65

78 143 35 136 87 41 32 27 65

77 140 35 136 87 41 32 27 65

Total

668

292 511

600

644

640

false sharing. The fixing change 008608b9d5 removed an extra spinlock. This regression requires a platform- and concurrency-sensitive microbenchmark; query-plan comparison gives no useful signal. Answer to RQ2: Three mechanisms cause most regressions: extra work on a hot path, plan selection or transformation, and concurrency or coordination, which together account for 61.8% of families. Plan changes mostly stay within the optimizer, whereas hot-path work appears in every module, so no single change signal or workload covers them.

4.3

RQ3: Evidence Completeness

Table 3 separates evidence types. Public evidence references are available for 600 families (89.8%); 511 (76.5%) identify a fixing revision. Code localization is stronger: 644 (96.4%) map to changed files and 640 (95.8%) to enclosing functions or diff hunks. However, only 292 families (43.7%) have an explicit introducing revision, and only 155 (23.2%) have both introducing and fixing references. At least one of the two revisions is available for 648 families (97.0%). Trigger conditions are explicitly structured for 503 families (75.3%). All 668 have an evidence-derived targetedtest hypothesis. Given this asymmetry, the full corpus is suitable for module/mechanism analysis and many forms of fix localization, while only the 292-family subset provides sound ground truth for introducing-commit prediction. Introducing revisions are also unevenly available. They are known for 60.7% of plan changes (85/140) but only 23.2% of extra hot-path work (42/181), for 83.3% of accepted trade-offs (100/120) but 34.2% of upstream-confirmed regressions (185/541), and for 94.3% of SQLite families but 29.7% of client/server families. The 292-family subset thus differs from the corpus. Plan changes rise from 21.0% to 29.1% and accepted trade-offs from 18.0% to 34.2%, whereas extra hot-path work falls from 27.1% to 14.4%. An evaluation limited to known introducing commits overweights optimizer regressions and SQLite, and should report results per mechanism or reweight them to the corpus. The dynamic evaluation in Section 5 inherits this skew.

Answer to RQ3: Most families can be localized in code, but fewer than half can be traced to the change that caused them. Over 95% map to changed files or functions, whereas only 43.7% identify the introducing revision, and this subset over-represents plan changes and accepted trade-offs. Commit-level evaluations need ground truth chosen by task, results reported per mechanism, and fixes never treated as causes.

5

DYNAMIC E VALUATION

This section answers RQ4. Section 5.1 builds executable evaluation cases from the corpus, Section 5.2 describes the detectors and how their alerts are attributed to a regression family, and Section 5.3 reports what they find and miss. 5.1

Evaluation Cases

To evaluate existing detectors, we derive executable evaluation cases from the 162 confirmed families whose introducing diff resolves in our source mirrors, excluding explicit performance trade-offs. Extending a 20-family pilot, we first select a predeclared target of 60 candidate families in 60 distinct introducing-change groups across eight systems and ten mechanisms, before any check of build or runtime feasibility. Predeclared mechanism quotas keep large classes from dominating: ten each for hot-path work, plan changes, and concurrency; eight each for algorithms and memory; six for I/O; four for statistics; two for other control changes; and one each for metadata and parallelism, the only eligible family in each. Within these quotas, we spread candidates across databases and trigger conditions. Each case pins the introducing commit, its first parent, and the linked fix when one exists. A primary workload exercises the reported trigger, a negative control does not, and both are fixed with their expected results before measurement. After warmup, at least five interleaved ABBA blocks compare the parent and introducing revisions, with a fixing-revision run after each block, and we bootstrap complete blocks to obtain a 95% interval for the relative slowdown. A case passes reference acceptance when its results are correct, its timings exceed the timer floor, its primary interval lies entirely at or above 5%, its control interval lies entirely below 5%, and the fixing revision is faster again. Observations without a linked fix therefore remain inconclusive. Of the 60 candidates, 13 pass acceptance, 18 remain inconclusive, and 29 lack executable fixtures. Candidates fail mainly because the control slows as well, because no usable fix shows recovery, or because our host cannot recreate the historical comparison; for example, one PostgreSQL regression depends on spinlock size on particular architectures. Untimed system-call counts and EXPLAIN plans check that reference cases reach their target code paths. Because this selection precedes any feasibility check, we then check all 162 families for whether their historical versions build and run, and measure 24 more. In total, 55 families have measurements and 31 pass reference acceptance, including 2 whose workloads are scaled-down adaptations of the original reports. From these, we choose 22

8

TABLE 4 Generator outcomes of SQLancer 2.0.0, one configuration per system, and SQLsmith on the 22 cases; Figure 5 covers all configurations. Fix-boundary attribution is retrospective for SQLite and predeclared for DuckDB and PostgreSQL (PG). “Signature, boundary” counts calibrated cases with a reproduced reference signature and with a valid fix boundary. Outcome

SQLite DuckDB

Selected cases 12 Signature, boundary (of) 9, 10 (10) Family-attributed alert Unattributed alerts only Alerts, invalid boundary No alert, calibrated No alert, uncalibrated Tool incompatible Not applicable

6 6 0 8 0 0 4

PG TiDB

5 4 3, 3 (5) 3, 4 (4)

1 –

1 0 2 2 0 0 5

0 0 0 0 0 0 2

2 1 0 2 1 2 0

evaluation cases in distinct change groups, covering all 9 inscope mechanisms with unequal quotas: six planning, four algorithm, four hot-path, three memory, and one in each of the other five categories. The quotas cap planning cases because 10 of the 12 accepted planning references come from SQLite. By system, the cases comprise 12 SQLite, 5 DuckDB, 4 PostgreSQL, and 1 TiDB. Statistics maintenance is excluded as a standalone category, and distributed communication and instrumentation lack eligible cases. 5.2

Detectors and Fix-Boundary Attribution

We run every detector that we could run on the historical versions. The SQL generators are SQLancer, with its NoREC, TLP [48], PQS [40], and CODDTest [49] oracles and its DuckDB and PostgreSQL generators, and SQLsmith. APOLLO [1] and AMOEBA [13] target performance, so each runs its own detection loop for 900 seconds per trial; APOLLO runs with three declared fixes to its released driver, and AMOEBA’s rewriter works only on its own demo schema. Benchmark replay runs the developers’ benchmarks, SQLite’s speedtest1, DuckDB’s microbenchmarks, and pgbench, on every version of each case. We could not run QPG [42], which mutates the database that our protocol keeps fixed, or the unreleased PUPPY [15], Hulk [16], and QueryZen [17]. Counting each SQLancer oracle and generator separately gives nine detector configurations, and we call each pairing of a case with a configuration or benchmark a combination. Every statement that a tool generates or reports is replayed on the parent and introducing revisions. The evaluator keeps statements whose typed results agree across versions and confirms each timing alert in 30 interleaved blocks; same-binary negative controls raise 0 alerts in 62 pairs, so measurement noise alone rarely produces an alert. Combinations that a tool cannot target (not applicable) or on which it fails are reported apart from misses: two SQLite triggers need write transactions that read-only replay excludes, SQLancer cannot set up the TiDB case, SQLsmith has no DuckDB or TiDB backend, and SQLancer 2.0.0 cannot initialize the two oldest PostgreSQL snapshots. Fix-boundary attribution. A timing alert shows that the introducing revision is slower than its parent, not that the slowdown belongs to the studied family; many SQLite alerts

Family-attributed alert Only unattributed alerts

No alert Tool incompatible

3

SQLancer NoREC SQLsmith 1.3 SQLancer DuckDB SQLancer PG SQLancer TLP SQLancer PQS SQLancer CODDTest APOLLO SQLFuzz AMOEBA

4 4

1

3

2

2

Not applicable

2 8

8

2

1 1

2

1

3

6

3

2

7

1

3

2 6

1

2

11

2

4

speedtest1 DuckDB micro 1 pgbench 0

8

18 9

3

4 4

5

10 15 evaluation cases

20

Fig. 5. Outcomes per detector and benchmark-replay baseline over the 22 cases. Each bar counts the case combinations in the tool’s target systems by outcome: a family-attributed alert, only unattributed alerts, no alert, a tool failing on the historical version, or not applicable. TLP, PQS, and CODDTest use the current SQLancer main branch; the other SQLancer rows use release 2.0.0. No tool applies to the TiDB case.

are broad slowdowns across query shapes unrelated to the reported trigger. We therefore re-measure each alert in 30 blocks across the fix and its first parent and attribute it to the family only if this boundary removes at least half of the introducing slowdown on a log scale, with a bootstrap lower bound of at least 5%. Each case’s reference workload must pass the same test; otherwise its boundary is invalid. For SQLite, we defined these criteria after the first runs and applied them retrospectively, attributing 220 of 787 alerts; for DuckDB and PostgreSQL, they were predeclared. 5.3

Results

Table 4 and Figure 5 summarize the outcomes. Calibration reproduces 15 of 19 reference signatures. Across the nine detector configurations, 15 of 81 applicable combinations, covering 7 cases, contain family-attributed alerts, and the developers’ benchmarks attribute none of 18. The clearest hit is the SQLite LEFT JOIN view case, where SQLancer and SQLsmith generate LEFT JOINs over the view that run 119– 527 times slower, with a plan change that the fix reverts. Using a lexical proxy of each reference trigger construct, we also check whether a tool’s statements ever contain the construct. The tools fail for different reasons: •

SQLancer (six bars in Figure 5, 49 applicable combinations). Ten combinations, covering six cases, contain family-attributed alerts. PQS’s pivot-row checks also wrap queries in a FROM-clause subquery and slow the view co-routine case by 84–411%. Other attributions are broad: TLP and CODDTest succeed only in the covering-index case, whose change slows table scans whether or not queries touch its virtual columns. In 27 of its 37 misses, no statement contains the trigger construct: on SQLite, SQLancer never emits JSON functions, matchinfo, recursive CTEs, or ORDER BY with LIMIT, and on PostgreSQL it never calls the fixture’s SQL function. Release 2.0.0 also cannot initialize the two 9.x PostgreSQL

9

•

•

•

•

snapshots, and the base binder rejects 93.6% of its DuckDB statements. SQLsmith (14 applicable combinations on SQLite and PostgreSQL). Four combinations contain familyattributed alerts, including a PostgreSQL SQL function that the reference also calls, which slows by 27%. In 8 of its 10 misses, no statement contains the trigger construct; for example, its PostgreSQL DML never targets the parent of the 1,001-table inheritance tree. In the other two, the construct appears in the wrong form: in the hash-join case of Figure 4, its 101 EXISTS semi-joins lack the many NULL-bearing equality keys. On PostgreSQL, 86.7% of its statements are excluded because they use unseeded TABLESAMPLE or functions that depend on randomness, the clock, or the session. APOLLO (14 applicable combinations). Its own detection rules discard most candidates before our evaluator sees them. On SQLite, 564 of 167,183 timed queries exceed its twofold threshold, but 561 of these run below its 10 ms minimum on our fixtures; its only adjudicated SQLite alert, in the join-order case, is attributed but differs in shape from the reference. On PostgreSQL, its 1.1-fold rule on single EXPLAIN ANALYZE timings yields 2,020 reports on the two 9.x snapshots, none of which survives repeated measurement, and its query filter skips the UPDATE statements that the inheritance case needs. Its 2018 SQLsmith fork fails on the two newer snapshots. AMOEBA (four PostgreSQL cases). It forms 3,126 sets of equivalent queries and reports 27 pairs whose members differ in time, but none yields a confirmed cross-version alert. Its oracle compares formulations within one version rather than across versions, and its rewriter works only on its own demo schema, which contains none of the fixture objects that the triggers involve. Developer benchmarks (18 applicable combinations). None attributes a regression; the largest slowdowns are 4.5% in speedtest1 and 0.4% in pgbench. Their workloads are fixed: pgbench runs singletable select-only and TPC-B-like transactions on its own schema, and speedtest1 batches its writes, so it misses even the in-memory case, whose regression adds time to every commit. DuckDB’s microbenchmarks raise one alert, a 23% slowdown that the fix does not remove, although its budget ran only 30– 44% of them in the four larger cases.

Answer to RQ4: Mostly not. The detectors raise many timing alerts, but re-measuring them across the fixing commit attributes alerts to the studied regression in only 7 of the 22 cases, and the developers’ benchmarks attribute none. The detectors miss mainly because their workloads never contain the triggering construct; timer resolution explains few misses.

6

D ISCUSSION

6.1

Comparison with Prior Findings

Our results agree with general performance-bug studies on where time is lost but differ in what database kernels add. Jin et al. attribute 76 of 109 performance bugs in five applications to uncoordinated or skippable function calls [21]; extra or repeated work on a hot path is likewise our largest mechanism (27.1%). Plan selection or transformation, our second mechanism (21.0%), has no counterpart in their categories or in the six root causes that Chen and Shang identify for Hadoop and RxJava [26], because a database can slow down when a change alters which plan it chooses, without any change to the code that executes the plan. Jin et al. also report that synchronization causes 22% of server bugs but 4.4% of client bugs. We see the same split between architectures, with concurrency or coordination changes causing 21.0% of client/server families and only one SQLite family. Their finding that almost half of the bugs need inputs with both special features and large scales also holds for our corpus: 47.8% of families need a larger data scale, and each of them also needs at least one other test dimension, such as SQL shape or schema (Table 6). Chen and Shang find that most regression-introducing commits in Hadoop and RxJava fix other bugs, and Ren et al. trace most slowdowns of Linux core operations to a few security enhancements, new features, and misconfigurations [27]. Our 120 accepted trade-offs (18.0%) show the same pressure in database kernels, where maintainers knowingly accept a slowdown for correctness, security, or another goal. Unlike these measurement-driven studies, our corpus contains only regressions that developers confirmed or accepted, so it describes regressions that mattered enough to be acknowledged, not every measurable slowdown. 6.2

Implications for Database Developers

Two results concern how projects test and record regressions. First, the developers’ own benchmarks attribute none of the 22 evaluated regressions (Section 5.3). Fixed suites such as speedtest1 and pgbench exercise common paths, whereas the regressions in our corpus need a particular query shape, data distribution, table count, or catalog size (Section 4). When a change touches a known risk area, a microbenchmark that varies the corresponding dimension of Table 5 likely costs less than diagnosing the regression after release. Second, the evidence that later analysis needs is recorded unevenly. An introducing revision is known for 82 of 87 SQLite families and 85 of 136 TiDB families, but for 4 of 41 MariaDB families, 5 of 65 ClickHouse families, and none of the 27 OceanBase families (Table 3). Recording the introducing commit when a regression is fixed would make it usable for bisection, attribution, and detector evaluation. Accepted costs are likewise visible mainly where a process asks for them: TiDB’s pull-request template has a side-effect field for CPU and memory regressions, and 62 of TiDB’s 64 accepted trade-offs, more than half of the 120 in the corpus, were declared there. 6.3

Implications for Detector Design

Table 5 turns recurring evidence patterns into requirements for a change-directed detector, which (1) analyzes a diff at

10

TABLE 5 Evidence-derived mapping from change signals to directed tests and oracles.

Diff or module signal

Principal risk

Targeted workload dimensions

Preferred oracle

Cost model, cardinality, rewrite rule Join, aggregate, sort, expression operator Buffer, pager, WAL, checkpoint, file format Lock, latch, atomic, task scheduler Allocation, copying, memory layout Catalog, DDL, statistics maintenance RPC, shard/region routing, retry policy Logging, tracing, metrics

Plan loss or unfavorable plan

SQL shape, schema, statistics, skew, selectivity Cardinality, row width, types, NULL rate, selectivity Working set, cache state, file layout, write ratio Concurrency, conflict rate, transaction length Row width, batch size, cardinality, memory limit Table/column/partition count, concurrent DDL Topology, shard count, batch size, fault injection Feature switches, QPS, statement complexity

Plan/operator structure, estimate error, latency Operator time, CPU/instructions, throughput Bytes/IOPS, cache misses, tail latency Throughput, lock wait, CPU, P95/P99 Allocations, peak memory, cache misses DDL latency, scanned rows, lock wait RPC/retry count, network bytes, latency CPU, allocations, throughput, event count

Extra work or algorithmic degradation I/O amplification or cache-policy degradation Contention, serialization, scheduling overhead Allocation/copy amplification or poor locality Metadata scan or maintenance amplification Request amplification or network wait Instrumentation entering a hot path

TABLE 6 Most frequent derived test dimensions (non-exclusive). Dimension Data scale SQL shape Schema Statistics Data distribution Contention

n

%

319 307 223 183 183 51

47.8 46.0 33.4 27.4 27.4 7.6

Dimension

n

%

Operator select. 124 18.6 Storage state 122 18.3 I/O layout 122 18.3 Concurrency 69 10.3 Configuration 62 9.3 Transaction pattern 51 7.6

file, function, and call-path levels; (2) predicts module and mechanism risks; (3) selects trigger dimensions; (4) instantiates targeted tests; and (5) combines structural signals with robust measurements. Our results constrain each step. Predict mechanisms, not only modules. Because plan changes mostly stay in the optimizer while hot-path work spans every module (RQ2), a file path says little about how a change can slow the kernel. A change to structure layout, loop placement, early exits, locking, or a cost formula can share vocabulary with harmless maintenance. A detector should consider control-flow and call-frequency changes, data-structure and synchronization operations, and optimizer-rule semantics, and rank changed hunks with plausible mechanisms instead of one module label. Vary the suspected trigger. Table 6 lists the non-exclusive dimensions that the corpus’s test hypotheses require. Data scale and SQL shape are the most common, but neither dominates. Schema, statistics, and data distribution mediate plan choices, storage state and I/O layout matter for 18.3% of families, and concurrency-related dimensions form a smaller but operationally distinct region. The detectors in Section 5 miss mainly because their workloads never contain the trigger. A change near a hash-join NULL path should therefore drive key count and NULL placement, a cache-line layout change thread count and pinning, and a WAL loop the segment count, rather than leave the trigger to a fixed workload. Combine structural and timing oracles. Timing alone re-

ports slowdowns outside the studied family and can miss the change itself. Most timing alerts in Section 5 are version differences outside the studied family. Conversely, in the WAL-recycling case, stat calls grow from 255 in the base to 8,510 in the candidate and drop to 252 at the fix, yet checkpoint latency does not recover at that fix. A detector should pair latency, throughput, CPU, memory, I/O, lockwait, and RPC measurements with structural evidence such as plans, operator counts, and system calls, and should base a verdict on repeated interleaved runs and effect sizes rather than on one elapsed-time comparison. 6.4

Implications for Evaluating Detectors

Three practices follow from RQ3 and the dynamic evaluation. First, ground truth must match the task and respect time. The 292 families with explicit introducing changes can be ordered by commit time: older families may support rule or model construction, and newer families form a holdout. Test templates, taxonomy refinements, and code representations derived from a held-out fix must not be exposed to the detector, and because this subset over-represents plan changes and accepted trade-offs, results should be reported per mechanism or reweighted to the corpus. Second, an alert should count only if it belongs to the studied regression. Remeasuring it across the fixing commit (Section 5.2) decides this independently of the mechanism, but requires both an introducing revision and a linked fix. Third, accepted tradeoffs need their own label. A correctness or security fix may intentionally make a narrow path slower; a detector should still quantify the cost and the affected workload, but a policy layer, not the performance oracle, decides whether it blocks a change. Training on trade-offs as ordinary bugs would teach a detector to flag intended costs, and discarding them would remove 18.0% of the corpus. Suitable metrics include Recall@K and mean reciprocal rank for ranking risky commits or hunks, trigger rate and generation success for tests, false-positive rate and stable effect size for the oracle, and time or resource savings relative to full benchmark replay.

11

7

T HREATS TO VALIDITY

Internal validity. Our confirmation rule relies on explicit upstream causality, and an upstream statement can be incomplete; we retain the evidence so that readers can audit each causal chain. We reproduced only seven families locally, because reproducing every family would require historical toolchains, hardware, datasets, and deployments and would favor newer, simpler cases, while an acknowledged fix or revert already establishes the cause. The corpus therefore supports analyses of code causes and triggers, not comparisons of slowdown magnitude. Deterministic normalization and a single primary category can misclassify cross-cutting changes. In the dynamic evaluation, all measurements come from one shared host and have not been replicated elsewhere, and the fixed 5% threshold may miss smaller effects. Fix-boundary attribution assumes that the linked fix is the complete repair, and it shows that an alert belongs to the family, not that it reproduces the reported symptom. The SQLite attribution criteria and trigger proxies were defined after its first runs, whereas those for DuckDB and PostgreSQL were declared before measurement. APOLLO and AMOEBA run through our adapters, which differ from their original setups. External validity. The selected systems cover four broad architecture styles, but not closed-source services or every open-source engine, and differences in language, governance, and deployment affect transferability. Projects expose different channels and historical depths, and the corpus misses regressions that were never reported, were discussed privately, or left no performance terms in their public record; multi-source search and cross-link expansion reduce but cannot eliminate this bias. Because candidate and source counts differ in units, they cannot yield project-level defect rates, so we report per-system composition rather than universal incidence. The corpus is a snapshot ending August 30, 2026, and later reports and fixes can change a family’s evidence. The 22 evaluation cases were chosen by mechanism quotas and executability rather than at random, so they favor embedded engines, with 17 of the 22 on SQLite or DuckDB, and cover distributed and concurrency regressions only sparsely. Seeded tool runs disclose schema and data derived from known references and use small smoke-test budgets, so they do not measure unconstrained discovery or support a tool ranking.

8

C ONCLUSION

We studied 668 publicly confirmed database-kernel performance regression families from nine open-source systems. Query optimization is the largest module, but execution, storage, and concurrency together account for more; hotpath work, plan changes, and coordination are the leading causal mechanisms; and source localization is much more available than the true introducing revision, which is known far more often for plan changes. These findings support a change-directed approach that classifies diff semantics, selects conditional workload dimensions, and combines structural and multi-metric oracles, and the corpus provides task-specific ground truth for developing and evaluating it, provided accepted trade-offs, fixing changes, and introducing changes remain distinct. Evaluating nine

detector configurations, including APOLLO and AMOEBA, and three developer benchmarks on 22 evaluation cases derived from the corpus yields two lessons for evaluating change-directed detectors. First, a timing alert across the introducing commit does not by itself rediscover the regression, because most alerts are broad version differences outside the studied family; re-measuring each alert across the fixing commit attributes it to the family independently of the mechanism. Second, most misses are generation gaps: in the corresponding cases the generators never emit the triggering construct, replaying the developers’ benchmarks attributes none of the regressions, timer sensitivity explains few misses, and several cases need writes or session state that read-only replay excludes.

R EFERENCES [1]

J. Jung, H. Hu, J. Arulraj, T. Kim, and W. Kang, “APOLLO: Automatic detection and diagnosis of performance regressions in database systems,” Proceedings of the VLDB Endowment, vol. 13, no. 1, pp. 57–70, Sep. 2019. [2] “Most widely deployed and used database engine,” SQLite documentation, Apr. 2026, Accessed: Oct. 27, 2026. [Online]. Available: https://sqlite.org/mostdeployed.html [3] Stack Overflow, “2025 developer survey: Technology,” Jul. 2025, Accessed: Oct. 27, 2026. [Online]. Available: https: //survey.stackoverflow.co/2025/technology [4] A. Avižienis, J.-C. Laprie, B. Randell, and C. Landwehr, “Basic concepts and taxonomy of dependable and secure computing,” IEEE Transactions on Dependable and Secure Computing, vol. 1, no. 1, pp. 11–33, Jan.–Mar. 2004. [5] “Regression report from 3.46.1,” SQLite User Forum, Dec. 2024, Accessed: Oct. 27, 2026. [Online]. Available: https: //sqlite.org/forum/forumpost/b18ef983e68d06d1 [6] “Regression from 3.46.1 traced to multiple joins with views,” SQLite User Forum, Jan. 2025, Accessed: Oct. 27, 2026. [Online]. Available: https://sqlite.org/forum/forumpost/ 40116a79d03f3771 [7] “Bug #111538: MySQL 8.0.33 is slower than MySQL 8.0.28 with queries using JOINS,” MySQL Bug System, Jun. 2023, Accessed: Oct. 27, 2026. [Online]. Available: https://bugs.mysql.com/bug. php?id=111538 [8] PostgreSQL Global Development Group, “PostgreSQL 10.5 release notes,” Aug. 2018, Accessed: Oct. 27, 2026. [Online]. Available: https://www.postgresql.org/docs/release/10.5/ [9] B. Ding, S. Das, W. Wu, S. Chaudhuri, and V. Narasayya, “Plan stitch: Harnessing the best of many plans,” Proceedings of the VLDB Endowment, vol. 11, no. 10, pp. 1123–1136, Jun. 2018. [10] M. Chow, Y. Wang, W. Wang, A. Hailu, R. Bopardikar, B. Zhang, J. Qu, D. Meisner, S. Sonawane, Y. Zhang, R. Paim, M. Ward, I. Huang, M. McNally, D. Hodges, Z. Farkas, C. Gocmen, E. Huang, and C. Tang, “ServiceLab: Preventing tiny performance regressions at hyperscale through pre-production testing,” in 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI), Jul. 2024, pp. 545–562. [Online]. Available: https://www.usenix.org/conference/osdi24/presentation/chow [11] V. Leis, A. Gubichev, A. Mirchev, P. Boncz, A. Kemper, and T. Neumann, “How good are query optimizers, really?” Proceedings of the VLDB Endowment, vol. 9, no. 3, pp. 204–215, Nov. 2015. [12] C. Laaber, J. Scheuner, and P. Leitner, “Software microbenchmarking in the cloud. how bad is it really?” Empirical Software Engineering, vol. 24, no. 4, pp. 2469–2508, Aug. 2019. [13] X. Liu, Q. Zhou, J. Arulraj, and A. Orso, “Automatic detection of performance bugs in database systems using equivalent queries,” in Proceedings of the 44th International Conference on Software Engineering, May 2022, pp. 225–236. [14] J. Ba and M. Rigger, “CERT: Finding performance issues in database systems through the lens of cardinality estimation,” in Proceedings of the 46th International Conference on Software Engineering, Apr. 2024. [15] Z. Wu, J. Liang, J. Fu, M. Wang, and Y. Jiang, “PUPPY: Finding performance degradation bugs in DBMSs via limited-optimization plan construction,” in Proceedings of the 47th IEEE/ACM International Conference on Software Engineering, Apr. 2025, pp. 679–690.

12

[16] ——, “Hulk: Exploring data-sensitive performance anomalies in DBMSs via data-driven analysis,” Proceedings of the ACM on Software Engineering, vol. 2, no. ISSTA, pp. 2181–2202, Jun. 2025. [17] J. Ba and Z. Su, “Finding performance issues in database systems by exploiting dormant code paths,” arXiv preprint arXiv:2605.22992, May 2026. [18] J. Śliwerski, T. Zimmermann, and A. Zeller, “When do changes induce fixes?” in Proceedings of the 2005 International Workshop on Mining Software Repositories, May 2005, pp. 1–5. [19] G. Rodrı́guez-Pérez, G. Robles, A. Serebrenik, A. Zaidman, D. M. Germán, and J. M. Gonzalez-Barahona, “How bugs are born: A model to identify how bugs are introduced in software components,” Empirical Software Engineering, vol. 25, no. 2, pp. 1294–1340, Mar. 2020. [20] Y. Lyu, H. J. Kang, R. Widyasari, J. Lawall, and D. Lo, “Evaluating SZZ implementations: An empirical study on the Linux kernel,” IEEE Transactions on Software Engineering, vol. 50, no. 9, pp. 2219– 2239, Sep. 2024. [21] G. Jin, L. Song, X. Shi, J. Scherpelz, and S. Lu, “Understanding and detecting real-world performance bugs,” in Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation, Jun. 2012, pp. 77–88. [22] S. Zaman, B. Adams, and A. E. Hassan, “A qualitative study on performance bugs,” in Proceedings of the 9th IEEE Working Conference on Mining Software Repositories, Jun. 2012, pp. 199–208. [23] A. Nistor, T. Jiang, and L. Tan, “Discovering, reporting, and fixing performance bugs,” in Proceedings of the 10th Working Conference on Mining Software Repositories, May 2013, pp. 237–246. [24] X. Han and T. Yu, “An empirical study on performance bugs for highly configurable software systems,” in Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, Sep. 2016, pp. 23:1–23:10. [25] B. Xu, D. Zhao, J. Zhou, W. Xie, K. Jia, J. Tian, and J. Xiang, “Crossproject aging-related bug prediction based on transfer learning and class imbalance learning,” IEEE Transactions on Dependable and Secure Computing, vol. 22, no. 5, pp. 5549–5566, Sep. 2025. [26] J. Chen and W. Shang, “An exploratory study of performance regression introducing code changes,” in Proceedings of the 2017 IEEE International Conference on Software Maintenance and Evolution, Sep. 2017, pp. 341–352. [27] X. J. Ren, K. Rodrigues, L. Chen, C. Vega, M. Stumm, and D. Yuan, “An analysis of performance evolution of Linux’s core operations,” in Proceedings of the 27th ACM Symposium on Operating Systems Principles, Oct. 2019, pp. 554–569. [28] J. Li, Y. Zhang, S. Lu, H. S. Gunawi, X. Gu, F. Huang, and D. Li, “Performance bug analysis and detection for distributed storage and computing systems,” ACM Transactions on Storage, vol. 19, no. 3, pp. 1–33, Aug. 2023. [29] L. Weng, R. Zhu, D. Wu, B. Ding, B. Zheng, and J. Zhou, “Eraser: Eliminating performance regression on learned query optimizer,” Proceedings of the VLDB Endowment, vol. 17, no. 5, pp. 926–938, Jan. 2024. [30] A. Fedorova, C. Mustard, I. Beschastnikh, J. Rubin, A. Wong, S. Miucin, and L. Ye, “Performance comprehension at WiredTiger,” in Proceedings of the 26th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, Oct. 2018, pp. 83–94. [31] D. Y. Yoon, Y. Wang, M. Yu, E. Huang, J. I. Jones, A. Kukkadapu, O. Kocas, J. Wiepert, K. Goenka, S. Chen, Y. Lin, Z. Huang, J. Kong, M. Chow, and C. Tang, “FBDetect: Catching tiny performance regressions at hyperscale through in-production monitoring,” in Proceedings of the ACM SIGOPS 30th Symposium on Operating Systems Principles, Nov. 2024, pp. 522–540. [32] M. B. Besbes, D. E. Costa, S. Mujahid, G. Mierzwinski, and M. Castelluccio, “A dataset of performance measurements and alerts from Mozilla (data artifact),” in Companion of the 16th ACM/SPEC International Conference on Performance Engineering, May 2025, pp. 16–20. [33] P. Leitner and C.-P. Bezemer, “An exploratory study of the state of practice of performance testing in Java-based open source projects,” in Proceedings of the 8th ACM/SPEC International Conference on Performance Engineering, Apr. 2017, pp. 373–384. [34] W. Wu, A. Dutt, G. Xu, V. Narasayya, and S. Chaudhuri, “Understanding and detecting query performance regression in practical index tuning,” Proceedings of the ACM on Management of Data, vol. 3, no. 6, pp. 1–26, Dec. 2025, to appear at ACM SIGMOD 2026.

[35] P. Huang, X. Ma, D. Shen, and Y. Zhou, “Performance regression testing target prioritization via performance risk analysis,” in Proceedings of the 36th International Conference on Software Engineering, May 2014, pp. 60–71. [36] S. Mostafa, X. Wang, and T. Xie, “PerfRanker: Prioritization of performance regression tests for collection-intensive software,” in Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis, Jul. 2017, pp. 23–34. [37] J. Chen, W. Shang, and E. Shihab, “PerfJIT: Test-level just-in-time prediction for performance regression introducing commits,” IEEE Transactions on Software Engineering, vol. 48, no. 5, pp. 1529–1544, May 2022. [38] D. Daly, W. Brown, H. Ingo, J. O’Leary, and D. Bradford, “The use of change point detection to identify software performance regressions in a continuous integration system,” in Proceedings of the ACM/SPEC International Conference on Performance Engineering, Apr. 2020, pp. 67–75. [39] Z. Lyu, T. Bach, Y. Li, N. M. Le, and L. Hoemke, “BIPeC: A combined change-point analyzer to identify performance regressions in large-scale database systems,” in Proceedings of the 2024 IEEE International Conference on Software Maintenance and Evolution, Oct. 2024, pp. 808–819. [40] M. Rigger and Z. Su, “Testing database engines via pivoted query synthesis,” in 14th USENIX Symposium on Operating Systems Design and Implementation. USENIX Association, Nov. 2020, pp. 667–682. [Online]. Available: https://www.usenix.org/ conference/osdi20/presentation/rigger [41] ——, “Detecting optimization bugs in database engines via nonoptimizing reference engine construction,” in Proceedings of the 28th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, Nov. 2020, pp. 1140–1152. [42] J. Ba and M. Rigger, “Testing database engines via query plan guidance,” in Proceedings of the 45th International Conference on Software Engineering, May 2023, pp. 2060–2071. [43] J. Li, Y. Zhou, and L. Wu, “Improving multitasking DBMS fuzzing with more accurate coverage and testcase trimming,” IEEE Transactions on Dependable and Secure Computing, vol. 22, no. 3, pp. 2756– 2770, May 2025. [44] S. Liu, R. Wang, Y. Xie, J. Chen, W. Lu, X. Zhang, Q. Xu, C. Yang, and X. Du, “A comprehensive study of bugs in relational DBMS,” IEEE Transactions on Software Engineering, vol. 51, no. 12, pp. 3654– 3668, Dec. 2025. [45] D. Li, Q. Liu, Y. Guo, J. Liang, Z. Wu, C. Zhang, J. Fu, H. Mao, Z. Guan, and Y. Jiang, “BugForge: Constructing and utilizing DBMS bug repository to enhance DBMS testing,” arXiv preprint arXiv:2604.03024, Apr. 2026. [46] X. Du, Y. Sui, Z. Liu, and J. Ai, “An empirical study of fault triggers in deep learning frameworks,” IEEE Transactions on Dependable and Secure Computing, vol. 20, no. 4, pp. 2696–2712, Jul. 2023. [47] J. Yang, P. Subramaniam, S. Lu, C. Yan, and A. Cheung, “How not to structure your database-backed web applications: A study of performance bugs in the wild,” in Proceedings of the 40th International Conference on Software Engineering, May 2018, pp. 800–810. [48] M. Rigger and Z. Su, “Finding bugs in database systems via query partitioning,” Proceedings of the ACM on Programming Languages, vol. 4, no. OOPSLA, pp. 1–30, Nov. 2020. [49] C. Zhang and M. Rigger, “Constant optimization driven database system testing,” Proceedings of the ACM on Management of Data, vol. 3, no. 1, pp. 1–24, Feb. 2025.

Related documents

Record · ID 1802079 · SHA-256 3c3242d627071078
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive