Skip to content

Bug Report: Union All Push Down Query to shard in v21.0.3 chooses a bad plan with temporay table usage #18081

@keyvanl

Description

@keyvanl

Overview of the Issue

Union All Push Down Query to shard in v21.0.3 chooses a bad plan with temporary table usage, whereas in v19.0.8 no temporary table usage is observed.

Reproduction Steps

README_temp_query_regression.md

Binary Version

Server version: 8.0.29-21 Version: 21.0.3 (Git revision 94fdc736eae8928a8fdde44e9ec9c3bee1868d6f branch 'HEAD') built on Wed Feb 12 16:56:27 UTC 2025 by runner@fv-az1705-503 using go1.23.5 linux/amd64

Operating System and Environment details

cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.10 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.10"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.10 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8"
BUG_REPORT_URL="https://issues.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.10
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.10"

uname -sr
Linux 4.18.0-553.34.1.el8_10.x86_64

uname -m
x86_64

Log Fragments

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions