{"id":18414491,"url":"https://github.com/zz-jason/hand-coded-tpch","last_synced_at":"2025-09-09T22:40:01.876Z","repository":{"id":132190771,"uuid":"127507613","full_name":"zz-jason/Hand-Coded-TPCH","owner":"zz-jason","description":"A hand coded implementation for queries in TPC-H benchmark","archived":false,"fork":false,"pushed_at":"2018-04-01T12:57:59.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T01:47:45.054Z","etag":null,"topics":["memory-database","performance","simd","tpch","vectorization"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zz-jason.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-31T06:59:51.000Z","updated_at":"2022-12-19T21:51:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"36acabfd-a747-45c7-92c9-b48fc2a2bd39","html_url":"https://github.com/zz-jason/Hand-Coded-TPCH","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zz-jason/Hand-Coded-TPCH","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-jason%2FHand-Coded-TPCH","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-jason%2FHand-Coded-TPCH/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-jason%2FHand-Coded-TPCH/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-jason%2FHand-Coded-TPCH/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zz-jason","download_url":"https://codeload.github.com/zz-jason/Hand-Coded-TPCH/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-jason%2FHand-Coded-TPCH/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274374522,"owners_count":25273824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["memory-database","performance","simd","tpch","vectorization"],"created_at":"2024-11-06T03:51:21.350Z","updated_at":"2025-09-09T22:40:01.831Z","avatar_url":"https://github.com/zz-jason.png","language":"C++","readme":"# Hand-Coded-TPCH\n\nA hand coded program can use the most efficient methods to gain the fastest query running speed, thus we can know the performance gap between current TiDB and the ideal database implementations.\n\n## 1. How To Generate csv files for every table\n\n```sh\ngit clone https://github.com/pingcap/tidb-bench.git\ncd tidb-bench/tpch\nmake tbl\n```\n\nthe last command will generate 1 csv file for 1 table:\n```sh\n➜ ls -l *.tbl\n-rw-r--r--  1 jianzhang.zj  staff   24346144 Mar 30 21:55 customer.tbl\n-rw-r--r--  1 jianzhang.zj  staff  759863287 Mar 30 21:55 lineitem.tbl\n-rw-r--r--  1 jianzhang.zj  staff       2224 Mar 30 21:55 nation.tbl\n-rw-r--r--  1 jianzhang.zj  staff  171952161 Mar 30 21:55 orders.tbl\n-rw-r--r--  1 jianzhang.zj  staff   24135125 Mar 30 21:55 part.tbl\n-rw-r--r--  1 jianzhang.zj  staff  118984616 Mar 30 21:55 partsupp.tbl\n-rw-r--r--  1 jianzhang.zj  staff        389 Mar 30 21:55 region.tbl\n-rw-r--r--  1 jianzhang.zj  staff    1409184 Mar 30 21:55 supplier.tbl\n```\n\nThe defailt scale factor is 1, to generate a larger csv file, take a look at `Makefile` for more details.\n\n## 2. What execution models can we consider\n\n### 2.1 Hyper\n\n- [2011 VLDB: \"Efficiently Compiling Efficient Query Plans for Modern Hardware\"](http://www.vldb.org/pvldb/vol4/p539-neumann.pdf)\n- [2011 ICDE: \"HyPer: A Hybrid OLTP\u0026OLAP Main Memory Database System Based on Virtual Memory Snapshots\"](https://www.cs.cmu.edu/~pavlo/courses/fall2013/static/slides/hyper.pdf)\n\n### 2.2 Vectorwise\n\n- [2005 CIDR: \"MonetDB/X100: Hyper-pipelining query execution\"](http://15721.courses.cs.cmu.edu/spring2018/papers/18-execution/boncz-cidr2005.pdf)\n- [2012 ICDE: \"Vectorwise: A vectorized analytical DBMS. In Data Engineering\"](https://pdfs.semanticscholar.org/2e0d/128a5695b02eeb39bd4e06e8eb54990026dd.pdf)\n- [2012: \"Query Optimization and Execution in Vectorwise MPP\"](https://homepages.cwi.nl/~boncz/msc/2012-AndreiCosteaAdrianIonescu.pdf)\n- [2015 SIGMOD: \"Rethinking SIMD Vectorization for In-Memory Databases\"](http://www.cs.columbia.edu/~orestis/sigmod15.pdf)\n\n### 2.3 Peloton\n\n- [2017 VLDB: \"Relaxed Operator Fusion for In-Memory Databases: Making Compilation, Vectorization, and Prefetching Work Together At Last\"](http://www.vldb.org/pvldb/vol11/p1-menon.pdf)\n- [2017 CIDR: \"Self-Driving Database Management Systems\"](https://www.cs.cmu.edu/~jarulraj/papers/2017.ai.cidr.pdf)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzz-jason%2Fhand-coded-tpch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzz-jason%2Fhand-coded-tpch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzz-jason%2Fhand-coded-tpch/lists"}