Question of the Performance on TPC-H Benchmark Query 2 #134803
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
O-community
Originated from the community
T-sql-queries
SQL Queries Team
X-blathers-triaged
blathers was able to find an owner
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
The text was updated successfully, but these errors were encountered: