TPC-H Benchmark
The TPC-H is a decision support benchmark. It consists of a suite of business oriented ad-hoc queries and concurrent data modifications. The queries and the data populating the database have been chosen to have broad industry-wide relevance. This benchmark illustrates decision support systems that examine large volumes of data, execute queries with a high degree of complexity, and give answers to critical business questions.
Timbr TPC-H Benchmark for Query Complexity
TPC-H ERD Model
Source: TPC-H Documentation

Timbr model of the TPC-H ERD
Results of query complexity comparison
Q1 | Timbr | Without |
---|---|---|
SQL Lines | 14 | 14 |
SQL JOINS | 0 | 0 |
Q3 | Timbr | Without |
---|---|---|
SQL Lines | 10 | 12 |
SQL JOINS | 0 | 2 |
Q5 | Timbr | Without |
---|---|---|
SQL Lines | 7 | 13 |
SQL JOINS | 0 | 5 |
Q7 | Timbr | Without |
---|---|---|
SQL Lines | 10 | 20 |
SQL JOINS | 0 | 5 |
Q9 | Timbr | Without |
---|---|---|
SQL Lines | 7 | 16 |
SQL JOINS | 0 | 5 |
Q11 | Timbr | Without |
---|---|---|
SQL Lines | 8 | 17 |
SQL JOINS | 0 | 2 |
Q13 | Timbr | Without |
---|---|---|
SQL Lines | 11 | 11 |
SQL JOINS | 0 | 1 |
Q15 | Timbr | Without |
---|---|---|
SQL Lines | 15 | 25 |
SQL JOINS | 0 | 1 |
Q17 | Timbr | Without |
---|---|---|
SQL Lines | 4 | 10 |
SQL JOINS | 0 | 1 |
Q19 | Timbr | Without |
---|---|---|
SQL Lines | 11 | 21 |
SQL JOINS | 0 | 1 |
Q21 | Timbr | Without |
---|---|---|
SQL Lines | 13 | 24 |
SQL JOINS | 0 | 3 |
Q2 | Timbr | Without |
---|---|---|
SQL Lines | 12 | 26 |
SQL JOINS | 0 | 7 |
Q4 | Timbr | Without |
---|---|---|
SQL Lines | 7 | 11 |
SQL JOINS | 0 | 0 |
Q6 | Timbr | Without |
---|---|---|
SQL Lines | 4 | 6 |
SQL JOINS | 0 | 0 |
Q8 | Timbr | Without |
---|---|---|
SQL Lines | 8 | 19 |
SQL JOINS | 0 | 7 |
Q10 | Timbr | Without |
---|---|---|
SQL Lines | 12 | 17 |
SQL JOINS | 0 | 3 |
Q12 | Timbr | Without |
---|---|---|
SQL Lines | 9 | 12 |
SQL JOINS | 0 | 1 |
Q14 | Timbr | Without |
---|---|---|
SQL Lines | 4 | 5 |
SQL JOINS | 0 | 1 |
Q16 | Timbr | Without |
---|---|---|
SQL Lines | 11 | 11 |
SQL JOINS | 0 | 1 |
Q18 | Timbr | Without |
---|---|---|
SQL Lines | 10 | 12 |
SQL JOINS | 0 | 2 |
Q20 | Timbr | Without |
---|---|---|
SQL Lines | 10 | 20 |
SQL JOINS | 0 | 1 |
Q22 | Timbr | Without |
---|---|---|
SQL Lines | 8 | 20 |
SQL JOINS | 0 | 0 |
Results Summary
Total | Timbr | Without |
---|---|---|
SQL Lines | 205 | 342 |
SQL JOINS | 0 | 49 |
Detailed TPC-H Benchmark Results
Select a query to view the results
This query reports the amount of business that was billed, shipped, and returned.
Q1-Timbr
Q1-TPC
In this query, we created calculated properties in Timbr so that we can query them more conveniently. For example, instead of writing a long calculation like l_extendedprice * (1 – l_discount) * (1 + l_tax), we created a charge property in the line_item concept’s mapping.
This query finds which supplier should be selected to place an order for a given part in a given region.
Q2-Timbr
Q2-TPC
In this example, we use relationships between concepts instead of using JOINS and as a result, the query can be significantly simplified. The query starts from the line_item concept and uses several relationships: from_supplier [product], has_nation [nation], has_region [region]. Some of them are related to the line_item concept and some of them are threading of a relationship on top of another relationship.
This query retrieves the 10 unshipped orders with the highest value.
Q3-Timbr
Q3-TPC
In this query, we use a calculated property, a relationship between the line_item concept and the order concept, and a classification of concepts in the ontology. In this example, we created a child concept of the customer concept called building_customer, and it contains only data where customer_mktsegment = BUILDING.
This query determines how well the order priority system is working and gives an assessment of customer satisfaction.
Q4-Timbr
Q4-TPC
In this query we use calculated properties, such as order_date_year and order_date_quarter.
This query lists the revenue volume done through local suppliers.
Q5-Timbr
Q5-TPC
In this query we use calculated properties such as volume and order_date_year, and several relationships such as: of_supplier[supplier], of_order[order], has_nation[nation], has_region[region], instead of using JOINS.
This query quantifies the amount of revenue increase that would have resulted from eliminating certain companywide discounts in a given percentage range in a given year.
Q6-Timbr
Q6-TPC
In this query, we use calculated properties such as revenue and ship_date_year, and a classification of concepts in the ontology. In this example, we created a child concept of the line_item concept called line_time_with_average_discount, containing only data where discount >= 0.05 and discount <= 0.07.
This query determines the value of goods shipped between certain nations to help in the re-negotiation of shipping contracts.
Q7-Timbr
Q7-TPC
In this query we use calculated properties such as volume and ship_date_year. Also, we use several relationships such as: of_supplier[supplier], has_nation[nation], of_order[order], ordered_by[customer], in_nation[nation], instead of using JOINS.
This query determines how the market share of a given nation within a given region has changed over two years for a given part type.
Q8-Timbr
Q8-TPC
In this query we use calculated properties such as volume and order_date_year. Also, we use several relationships such as: of_order[order], of_supplier[supplier], has_nation[nation], ordered_by[customer], in_nation[nation], has_region[region], has_product[product], instead of using JOINS. This query pulls data from all the concepts in the ontology without using JOINS.
This query determines how much profit is made on a given line of parts, broken out by supplier nation and year.
Q9-Timbr
Q9-TPC
In this query we use a calculated property, several relationships between the supplier concept and the other concepts, and a classification of concepts in the ontology. In this example, we created a child concept of the product concept called green_product, and it contains only data where product_name like %green%. Also, we use a relationship’s property named from_supplier[green_product]_ps_supplycost, originating from the table tpc.partsupp.
The query identifies customers who might be having problems with the parts that are shipped to them.
Q10-Timbr
Q10-TPC
In this query we use calculated properties such as volume, order_date_year, and order_date_quarter, and several relationships such as: has_ordered[order], has_line_item[returned_line_item], in_nation[nation], instead of using JOINS. Also, we created a child concept of the line_item concept called returned_line_item, and it contains only data where `return_flag` = ‘R’.
This query finds the most important subset of suppliers’ stock in a given nation.
Q11-Timbr
Q11-TPC
In this query, we use a calculated relationship property called supply_value. We also use several relationships instead of using JOINS, and a classification of concepts in the ontology. In this example, we created a child concept of the supplier concept called middle_east_supplier, and a child concept of middle_east supplier called saudi_arabia_supplier , and it contains only data where nation_key = ’20’.
This query determines whether selecting less expensive modes of shipping is negatively affecting the critical-priority orders by causing more parts to be received by customers after the committed date.
Q12-Timbr
Q12-TPC
In this query, we use a calculated property called receipt_date_year, several relationships instead of using JOINS, and a classification of concepts in the ontology. In this example, we created a child concept of the line_item concept called mail_and_ship_line_item, and it contains only data where ship_mode IN (‘MAIL’, ‘SHIP’).
This query seeks relationships between customers and the size of their orders.
Q13-Timbr
Q13-TPC
In this query, we use the relationship has_ordered[order] instead of using JOINS.
This query monitors the market response to a promotion such as TV advertisements or a special campaign.
Q14-Timbr
Q14-TPC
In this query, we use a volume-calculated property and a relationship between the line_item concept and product concept instead of using JOINS.
This query determines the top supplier so it can be rewarded, given more business, or identified for special recognition.
Q15-Timbr
Q15-TPC
In this query, we use calculated properties such as ship_date_year, ship_date_quarter, total_revenue_by_quarter, and several relationships instead of using JOINS.
This query finds out how many suppliers can supply parts with given attributes. It might be used, for example, to determine whether there is a sufficient number of suppliers for heavily ordered parts.
Q16-Timbr
Q16-TPC
In this query, we use a relationship between the product concept and supplier concept instead of using JOINS.
This query determines how much average yearly revenue would be lost if orders were no longer filled for small quantities of certain parts. This may reduce overhead expenses by concentrating sales on larger shipments.
Q17-Timbr
Q17-TPC
In this query, we use a relationship between the line_item concept and product concept instead of using JOINS.
This query ranks customers based on their having placed a large quantity order. Large quantity orders are defined as those orders whose total quantity is above a certain level.
Q18-Timbr
Q18-TPC
In this query, we use the relationships: ordered_by[customer], has_line_item[line_item], instead of using JOINS.
This query reports the gross discounted revenue attributed to the sale of selected parts handled in a particular manner. This query is an example of code such as might be produced programmatically by a data mining tool.
Q19-Timbr
Q19-TPC
In this query, we use two classifications of concepts in the ontology. First, we created a child concept of the line_item concept called in_person_air_delivery_line_time, and it contains only data where ship_instruct = ‘DELIVER IN PERSON’ AND `ship_mode` IN (‘AIR’, ‘AIR REG’). Then, we created three child concepts of the product concept called sm_product, med_product and lg_product, when each contains data filtered by a different container. For example, the sm_product concept contains only data where `container` IN (‘SM CASE’, ‘SM BOX’, ‘SM PACK’, ‘SM PKG’). Also, we use the has_product relationship instead of using JOINS.
This query identifies suppliers in a particular nation having selected parts that may be candidates for a promotional offer.
Q20-Timbr
Q20-TPC
In this query, we created a child concept for the concept product called forest_product, and it contains only data where product_name like ‘forest%’. We also use the relationships: from_supplier[forest_product], has_nation[nation], instead of using JOINS.
This query identifies certain suppliers who were not able to ship required parts in a timely manner.
Q21-Timbr
Q21-TPC
In this query, we use several relationships instead of using JOINS, and a classification of concepts in the ontology. In this example, we created a child concept of the supplier concept called middle_east_supplier, and a child concept of middle_east supplier called saudi_arabia_supplier, and it contains only data where nation_key = ’20’. We also created a child concept of the line_item concept called late_line_item, and it contains only data where receipt_date > commit_date.
This query identifies geographies where there are customers who may be likely to make a purchase.
Q22-Timbr
Q22-TPC
In this query, we use a classification of concepts in the ontology, and several relationships instead of using an Exists statement. In this example, we created a child concept of the customer concept called global_customer, and it contains only data where `phone_country_code` IN (’13’, ’31’, ’23’, ’29’, ’30’, ’18’, ’17’).