An implementation of TPC-H in the MyriaL language
Python Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is an implementation of TPC-H in the MyriaL language. You can use it to generate TPC-H query plans for any back end of the Raco relational algebra compiler.


tpch-myrial requires TPC-H qgen to generate SQL queries and Raco to generate the query plans.

  • Download qgen
  • Install Raco by following its and then make sure to set RACO_HOME to the directory of your Raco

Generate the queries

The queries are expressed as TPC-H qgen template files. The following command will run qgen on all the templates using the test parameters from the TPC-H specification.


See the plan of a query

$RACO_HOME/scripts/myrial [flag] q1.myl

Run $RACO_HOME/scripts/myrial -h for documentation about the different kinds of output.

Compile the queries to Grappa (Radish) programs



  • The queries are currently modified to omit sorting (ORDER BY) because MyriaL does not yet support ORDER BY.
  • If you want qgen to work in general (e.g., to use the templates for the traditional ad-hoc TPC-H benchmark), then you need to fix the date ranges. See query 4 for an example. MyriaL doesn't have date intervals, but qgen expects them. The easiest fix is to extend Raco with a built-in function.