Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different plan when set the enable_parallel on REPLICATED table. #824

Open
1 of 2 tasks
jiaqizho opened this issue Dec 30, 2024 · 0 comments
Open
1 of 2 tasks

different plan when set the enable_parallel on REPLICATED table. #824

jiaqizho opened this issue Dec 30, 2024 · 0 comments
Labels
priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix type: Performance cloudberry runs slow on some particular query

Comments

@jiaqizho
Copy link
Contributor

Apache Cloudberry version

No response

What happened

drop table if exists with_test2 cascade;
drop table if exists with_test3 cascade;
create table with_test2 (id bigserial NOT NULL, isc varchar(15) NOT NULL,iscd varchar(15) NULL) DISTRIBUTED REPLICATED;
create table with_test3 (id numeric NULL, rc varchar(255) NULL,ri numeric NULL) DISTRIBUTED REPLICATED;
insert into with_test2 (isc,iscd) values ('CMN_BIN_YES', 'CMN_BIN_YES');
insert into with_test3 (id,rc,ri) values (113551,'CMN_BIN_YES',101991), (113552,'CMN_BIN_NO',101991), (113553,'CMN_BIN_ERR',101991), (113554,'CMN_BIN_NULL',101991);
explain
WITH
    t1 AS (SELECT * FROM with_test2),
    t2 AS (SELECT id, rc FROM with_test3 WHERE ri = 101991)
SELECT p.*FROM t1 p JOIN t2 r ON p.isc = r.rc JOIN t2 r1 ON p.iscd = r1.rc LIMIT 1;

The result when enable_parallel turn on and off.
image

This case has nothing to do with the table's statistics.
Result after analyze:
image

What you think should happen instead

No response

How to reproduce

pass

Operating System

any

Anything else

No response

Are you willing to submit PR?

  • Yes, I am willing to submit a PR!

Code of Conduct

@jiaqizho jiaqizho added type: Bug Something isn't working priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix type: Performance cloudberry runs slow on some particular query and removed type: Bug Something isn't working labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix type: Performance cloudberry runs slow on some particular query
Projects
None yet
Development

No branches or pull requests

1 participant