OpenTenBase / OpenTenBase/TXSQL

Add WinMagic Subquery Decorrelation

Open
#61 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
337
Forks
234
PR merge metrics
No merged PRs in 30d

Description

Some correlated scalar subqueries repeatedly access tables that are already referenced by the outer query block, which can lead to unnecessary execution overhead.
Add WinMagic optimization to decorrelate eligible correlated scalar subqueries using window functions. This optimization reduces redundant access to tables shared by the outer query and subquery, allowing supported queries to be transformed into a window aggregation plan for better execution performance.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by locating the optimizer entry point for correlated scalar subqueries and any existing window-aggregation transformations. Verify the behavior with representative eligible queries; done means supported correlated scalar subqueries are decorrelated into window aggregation plans without changing their results.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.