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

Simplify tpc-ds q34, q73 a bit to help an optimizer #7969

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ydb/library/benchmarks/queries/tpcds/yql/q34.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ select c_last_name
and (household_demographics.hd_buy_potential = '>10000' or
household_demographics.hd_buy_potential = 'Unknown')
and household_demographics.hd_vehicle_count > 0
and (case when household_demographics.hd_vehicle_count > 0
then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count
else null
end) > 1.2
and household_demographics.hd_dep_count / household_demographics.hd_vehicle_count > 1.2
and date_dim.d_year in (2000,2000+1,2000+2)
and store.s_county in ('Salem County','Terrell County','Arthur County','Oglethorpe County',
'Lunenburg County','Perry County','Halifax County','Sumner County')
Expand Down
3 changes: 1 addition & 2 deletions ydb/library/benchmarks/queries/tpcds/yql/q73.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ select c_last_name
and (household_demographics.hd_buy_potential = '>10000' or
household_demographics.hd_buy_potential = '5001-10000')
and household_demographics.hd_vehicle_count > 0
and case when household_demographics.hd_vehicle_count > 0 then
household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end > 1
and household_demographics.hd_dep_count / household_demographics.hd_vehicle_count > 1
and date_dim.d_year in (2000,2000+1,2000+2)
and store.s_county in ('Lea County','Furnas County','Pennington County','Bronx County')
group by store_sales.ss_ticket_number,store_sales.ss_customer_sk) dj cross join {{customer}} as customer
Expand Down
Loading