Open bajinsheng opened 2 weeks ago
Hi @bajinsheng, please add branch-* labels to identify which branch(es) this C-bug affects.
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
Hello, I am Blathers. I am here to help you get the issue triaged.
Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.
I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
Thanks for the report! This is an interesting finding!
Describe the problem
For the query 2 in TPC-H benchmark:
Its execution time is 11.3s, as shown in its query plan plan_before.txt
I found that disabling the following IF code block brings a significant performance improvement:
Its execution time is reduced to 0.471s, as shown in the new query plan plan_after.txt
I wonder whether we can relax this IF condition to enable the second query plan in default, as it is more efficient than the first one.
To Reproduce
Then execute the above query.
Environment:
psql "postgresql://root@127.0.0.1:26257/tpch"
]Jira issue: CRDB-44256