Skip to content

Commit

Permalink
Simplify tpc-ds q34, q73 a bit to help an optimizer (ydb-platform#7969)
Browse files Browse the repository at this point in the history
  • Loading branch information
zverevgeny committed Sep 12, 2024
1 parent ea981fa commit 0f93c3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
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

0 comments on commit 0f93c3e

Please sign in to comment.