- Created
min_part_supplycost_per_regionview to eliminate the subquery of minimum supply cost and eliminate the use ofregioncolumn
- Eliminate usage of
regioncolumn
- Filter
parttable before joining - Use Joins instead of cross product
- Use the created Materialized view
idx_mpsc_regionname: clustered index onregionnamecol. inmin_part_supplycost_per_regionview to eliminate sequential search
- Add the materialized view (summarized_lineitem)
- Stop using the massive lineitem table
- Use joins insted of cross products to decrease planning time
- Use the view
idx_cutomer_custkey_mktsegment: Eliminate sequential search in join
N/A
N/A
- Substituted
count(*)withcount(o_orderkey)
idx_lineitem_orderkey: Non-clustered index to eliminate sequential search on the massivelineitemtable and provide index-only scanidx_orders_orderdate: Clustered index onorders.orderdateto help in sorting and eliminate sequential search onordertable
- Created
lineitem_partto help calculate aggregations onlineitemtable
- Eliminated the use of the massive
lineitem
- Used
joininstead of cross product to reduce planning time
- Created the
idx_lineitem_partkeyincluding l_quantity andl_extendedpricefields to reach index-only scan on lineitem - Created
idx_lineitem_part_partkeyonlineitem_partview to eliminate seq. scan on it
- Created a lightweight view
customer_ordersto eliminate usage ofordersandcustomertables directly in the query
- Eliminated the usage of
ordersandcustomertable
- Used
count(<col_name>)instead ofcount(*) - Used the view instead of the nested subquery
N/A