Commit f12a54b1 authored by Marcel Huber's avatar Marcel Huber
Browse files

ColumnStore: moved index column

parent 48a36929
# shellcheck shell=bash
# shellcheck disable=SC2034
queries=(
"eo1|lastname-firstname-customers|(Q1)|select lastname, firstname from customers;||customers(lastname,firstname)"
"eo1|lastname-firstname-customers-id1000|(Q2)|select lastname, firstname from customers where customerid=1000;||customers(lastname,firstname)"
"eo1|lastname-firstname-customers-idrange|(Q3)|select lastname, firstname from customers where customerid between 1000 and 1100;||customers(lastname,firstname)"
"eo1|lastname-firstname-customers-agerange|(Q4)|select lastname, firstname from customers where age between 20 and 30;||customers(age,lastname,firstname)"
"eo1|lastname-firstname-customers-gtZ|(Q5)|select lastname, firstname from customers where lastname > 'Z';||customers(lastname,firstname)"
"eo1|lastname-firstname-customers-gtN|(Q6)|select firstname from customers where lastname > 'N';||customers(lastname,firstname)"
"eo1|lastname-firstname-customers-orderby|(Q7)|select lastname, firstname from customers order by lastname, firstname;||customers(lastname,firstname)"
"eo1|lastname-firstname-customers-gtZ-orderby|(Q8)|select lastname, firstname from customers where lastname > 'Z' order by lastname, firstname;||customers(lastname,firstname)"
"eo1|lastname-firstname-customers-stateAR|(Q9)|select lastname, firstname from customers where state='AR';||customers(state,lastname,firstname)"
"eo1|title-price-products-subselect|(Q10)|select title, price from products where price=(select max(price) from products);||products(price,title)"
"eo1|income_avg-customers|(Q11)|select avg(income) from customers;||customers(income)"
"eo1|lastname-firstname-customers|(Q1)|select lastname, firstname from customers;|customers(lastname,firstname)|"
"eo1|lastname-firstname-customers-id1000|(Q2)|select lastname, firstname from customers where customerid=1000;|customers(lastname,firstname)|"
"eo1|lastname-firstname-customers-idrange|(Q3)|select lastname, firstname from customers where customerid between 1000 and 1100;|customers(lastname,firstname)|"
"eo1|lastname-firstname-customers-agerange|(Q4)|select lastname, firstname from customers where age between 20 and 30;|customers(age,lastname,firstname)|"
"eo1|lastname-firstname-customers-gtZ|(Q5)|select lastname, firstname from customers where lastname > 'Z';|customers(lastname,firstname)|"
"eo1|lastname-firstname-customers-gtN|(Q6)|select firstname from customers where lastname > 'N';|customers(lastname,firstname)|"
"eo1|lastname-firstname-customers-orderby|(Q7)|select lastname, firstname from customers order by lastname, firstname;|customers(lastname,firstname)|"
"eo1|lastname-firstname-customers-gtZ-orderby|(Q8)|select lastname, firstname from customers where lastname > 'Z' order by lastname, firstname;|customers(lastname,firstname)|"
"eo1|lastname-firstname-customers-stateAR|(Q9)|select lastname, firstname from customers where state='AR';|customers(state,lastname,firstname)|"
"eo1|title-price-products-subselect|(Q10)|select title, price from products where price=(select max(price) from products);|products(price,title)|"
"eo1|income_avg-customers|(Q11)|select avg(income) from customers;|customers(income)|"
"eo1|customerid_max-customers|(Q12)|select max(customerid) from customers;||"
"eo1|city-customerid_count-customers-between-groupby-orderby|(Q13)|select city, count(customerid) from customers where city between 'B' and 'E' group by city order by city;||customers(city,customerid)"
"eo1|city-customerid_count-income_sum-customers-between-groupby-orderby|(Q14)|select city, count(customerid), sum(income) from customers where city between 'B' and 'E' group by city order by city;||customers(city,customerid,income)"
"eo1|city-customerid_count-customers-between-groupby-orderby|(Q13)|select city, count(customerid) from customers where city between 'B' and 'E' group by city order by city;|customers(city,customerid)|"
"eo1|city-customerid_count-income_sum-customers-between-groupby-orderby|(Q14)|select city, count(customerid), sum(income) from customers where city between 'B' and 'E' group by city order by city;|customers(city,customerid,income)|"
"eo1|orderid-orderlineid-orderlines-limit30|(Q15)|SELECT orderid, orderlineid FROM orderlines LIMIT 30;|orderlines(orderid,orderlineid)|"
"eo1|star-orderlines-id3|(Q16)|SELECT * FROM orderlines WHERE orderid=3;|orderlines(orderid,orderlineid)|"
"eo1|star-orderlines-lineid8|(Q17)|SELECT * FROM orderlines WHERE orderlineid=8;|orderlines(orderid,orderlineid)|"
......@@ -23,15 +23,16 @@ queries=(
"eo1|count-orderlines-lineid_gt6|(Q20)|SELECT COUNT(*) Anzahl FROM orderlines WHERE orderlineid > 6;|orderlines(orderid,orderlineid)|"
"eo1|count-quantity_sum-orderlines-lineid_gt6|(Q21)|SELECT COUNT(*) Anzahl, SUM(quantity) Menge FROM orderlines WHERE orderlineid > 6;|orderlines(orderid,orderlineid)|orderlines(orderlineid,quantity)"
"eo1|count-quantity_sum-orderlines-lineid_gt10|(Q22)|SELECT COUNT(*) Anzahl, SUM(quantity) Menge FROM orderlines WHERE orderlineid > 10;|orderlines(orderid,orderlineid)|orderlines(orderlineid,quantity)"
"eo1|star-products-titlelike|(Q23)|select * from products where title like '%ACADEMY FLY%';||products(title)@products using gist(title gist_trgm_ops)"
"eo1|simple-query|(Q24) Ein normaler Hash-Join|SELECT o.customerid, o.orderid, o.orderdate, ol.orderlineid, ol.quantity FROM orders o INNER JOIN orderlines ol ON ol.orderid = o.orderid;||orders(orderid,customerid,orderdate)@orderlines(orderid,orderlineid,quantity)"
"eo1|nested-loop-join|(Q25) Nested Loop Join|SELECT o.customerid, o.orderid, o.orderdate, ol.orderlineid, ol.quantity FROM orders o INNER JOIN orderlines ol ON ol.orderid=o.orderid WHERE o.orderid BETWEEN 10 AND 20;||orders(orderid,customerid,orderdate)@orderlines(orderid,orderlineid,quantity)"
"eo1|non-equi-join|(Q26) Non-Equi Join|SELECT o1.orderid, o2.orderid FROM orders o1 JOIN orders o2 ON o1.orderdate<>o2.orderdate WHERE o1.customerid<100;||orders(customerid)@orders(customerid,orderdate)"
"eo1|grouped-join|(Q27)|SELECT cat.categoryname, count(prod.prod_id) anzahl FROM products prod INNER JOIN categories cat ON prod.category=cat.category GROUP BY cat.categoryname ORDER BY cat.categoryname;||products(category)"
"eo1|star-products-titlelike|(Q23)|select * from products where title like '%ACADEMY FLY%';|products(title)@products using gist(title gist_trgm_ops)|"
"eo1|simple-query|(Q24) Ein normaler Hash-Join|SELECT o.customerid, o.orderid, o.orderdate, ol.orderlineid, ol.quantity FROM orders o INNER JOIN orderlines ol ON ol.orderid = o.orderid;|orders(orderid,customerid,orderdate)@orderlines(orderid,orderlineid,quantity)|"
"eo1|nested-loop-join|(Q25) Nested Loop Join|SELECT o.customerid, o.orderid, o.orderdate, ol.orderlineid, ol.quantity FROM orders o INNER JOIN orderlines ol ON ol.orderid=o.orderid WHERE o.orderid BETWEEN 10 AND 20;|orders(orderid,customerid,orderdate)@orderlines(orderid,orderlineid,quantity)|"
"eo1|non-equi-join|(Q26) Non-Equi Join|SELECT o1.orderid, o2.orderid FROM orders o1 JOIN orders o2 ON o1.orderdate<>o2.orderdate WHERE o1.customerid<100;|orders(customerid)@orders(customerid,orderdate)|"
"eo1|grouped-join|(Q27)|SELECT cat.categoryname, count(prod.prod_id) anzahl FROM products prod INNER JOIN categories cat ON prod.category=cat.category GROUP BY cat.categoryname ORDER BY cat.categoryname;|products(category)|"
"eo1|grouped-join-reduced|(Q28) Eingeschränkt|SELECT cat.categoryname, count(prod.prod_id) anzahl FROM products prod INNER JOIN categories cat ON prod.category=cat.category WHERE cat.category = 6 GROUP BY cat.categoryname ORDER BY cat.categoryname;||"
"eo1|cat11-exists|(Q29) Ein Produkt der Kategorie 11 mit EXISTS|SELECT * FROM orders o WHERE EXISTS ( SELECT * FROM orderlines ol inner join products p on ol.prod_id=p.prod_id WHERE ol.orderId=o.orderid AND P.category=11);||products(category)@orderlines(prod_id)"
"eo1|cat11-distinct|(Q30) Ein Produkt der Kategorie 11 mit DISTINCT|SELECT DISTINCT o.* FROM orders o inner join orderlines ol on ol.orderId=o.orderid inner join products p on ol.prod_id=p.prod_id WHERE P.category=11;||products(category)@orderlines(prod_id)"
"eo1|cat11-having|(Q31) Ein Produkt der Kategorie 11 mit HAVING|SELECT o.orderid,o.orderdate,o.customerid,o.netamount,o.tax,o.totalamount FROM orders o inner join orderlines ol on ol.orderId=o.orderid inner join products p on ol.prod_id=p.prod_id GROUP BY p.category,o.orderid,o.orderdate,o.customerid,o.netamount,o.tax,o.totalamount HAVING p.category=11;||products(category)@orderlines(prod_id)"
"eo1|cat11-cte-join|(Q32)|with orderlines_to_products_eleven as (select * from products p inner join orderlines ol on ol.prod_id=p.prod_id where p.category=11) select * from orders o inner join orderlines_to_products_eleven ope on o.orderid=ope.orderid;||products(category)@orderlines(prod_id)"
"eo1|cat11-cte-subselect|(Q33)|with cat_eleven_products as ( select * from products where category=11 ), orderlines_to_products_eleven as ( select * from orderlines ol, cat_eleven_products cep where ol.prod_id=cep.prod_id ) select * from orders o inner join orderlines_to_products_eleven ope on o.orderid=ope.orderid;||products(category)@orderlines(prod_id)"
"eo1|cat11-exists|(Q29) Ein Produkt der Kategorie 11 mit EXISTS|SELECT * FROM orders o WHERE EXISTS ( SELECT * FROM orderlines ol inner join products p on ol.prod_id=p.prod_id WHERE ol.orderId=o.orderid AND P.category=11);|products(category)@orderlines(prod_id)|"
"eo1|cat11-distinct|(Q30) Ein Produkt der Kategorie 11 mit DISTINCT|SELECT DISTINCT o.* FROM orders o inner join orderlines ol on ol.orderid=o.orderid inner join products p on ol.prod_id=p.prod_id WHERE P.category=11;|products(category)@orderlines(prod_id)|"
"eo1|cat11-having|(Q31) Ein Produkt der Kategorie 11 mit HAVING|SELECT o.orderid,o.orderdate,o.customerid,o.netamount,o.tax,o.totalamount FROM orders o inner join orderlines ol on ol.orderId=o.orderid inner join products p on ol.prod_id=p.prod_id GROUP BY p.category,o.orderid,o.orderdate,o.customerid,o.netamount,o.tax,o.totalamount HAVING p.category=11;|products(category)@orderlines(prod_id)|"
"eo1|cat11-cte-join|(Q32)|with orderlines_to_products_eleven as (select * from products p inner join orderlines ol on ol.prod_id=p.prod_id where p.category=11) select * from orders o inner join orderlines_to_products_eleven ope on o.orderid=ope.orderid;|products(category)@orderlines(prod_id)|"
"eo1|cat11-cte-subselect|(Q33)|with cat_eleven_products as ( select * from products where category=11 ), orderlines_to_products_eleven as ( select * from orderlines ol, cat_eleven_products cep where ol.prod_id=cep.prod_id ) select * from orders o inner join orderlines_to_products_eleven ope on o.orderid=ope.orderid;|products(category)@orderlines(prod_id)|"
"eo1|customerid_avg-cust_hist|(Q34)|select avg(customerid) from cust_hist;||"
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment