HorsePower

所属分类:数据库系统
开发工具:C++
文件大小:50405KB
下载次数:0
上传日期:2020-09-21 14:33:23
上 传 者sh-1993
说明:  使用数组编程优化数据库查询
(Optimizing database queries with array programming)

文件列表:
data (0, 2020-04-01)
data\tpch-bin (0, 2020-04-01)
data\tpch (0, 2020-04-01)
data\tpch\run.sh (1041, 2020-04-01)
data\tpch\tpc-h-tool.zip (23686517, 2020-04-01)
docs (0, 2020-04-01)
docs\conventions (0, 2020-04-01)
docs\conventions\demo.c (427, 2020-04-01)
docs\conventions\style.md (1767, 2020-04-01)
docs\design (0, 2020-04-01)
docs\design\HorseIR.md (8886, 2020-04-01)
docs\design\mal.md (1686, 2020-04-01)
docs\examples (0, 2020-04-01)
docs\examples\simple-join (0, 2020-04-01)
docs\figures (0, 2020-04-01)
docs\figures\dragon-sql.png (1189194, 2020-04-01)
docs\figures\horse-flow.png (18489, 2020-04-01)
docs\figures\horse-flow2.png (16114, 2020-04-01)
docs\figures\horse-ir.png (9968, 2020-04-01)
docs\horsetype (0, 2020-04-01)
docs\horsetype\Makefile (407, 2020-04-01)
docs\horsetype\expressions.tex (4431, 2020-04-01)
docs\horsetype\inference.tex (1393, 2020-04-01)
docs\horsetype\rules.tex (850, 2020-04-01)
docs\horsetype\shape.tex (5769, 2020-04-01)
docs\horsetype\stmts.tex (1174, 2020-04-01)
docs\implementation (0, 2020-04-01)
docs\implementation\method.md (892, 2020-04-01)
docs\implementation\types.md (2047, 2020-04-01)
docs\license (0, 2020-04-01)
docs\license\pcre2.txt (3441, 2020-04-01)
docs\mkdocs (0, 2020-04-01)
docs\mkdocs\docs (0, 2020-04-01)
... ...

# HorsePower HorsePower is designed for optimizing database queries with modern hardware. At its core is **HorseIR**, which is a well-designed array-based intermediate representation (IR) for database queries. Based on HorseIR, sophisticated compiler optimizations can be applied for database operations. Moreover, using array programming offers a promising option for performance speedup with fine-grained parallelism. ## Project Overview

Figure 1. The workflow of the HorsePower framework.

In summer 2017, we started this project from scratch. The workflow of the HorsePower framework can be found in Figure 1. A candidate of the source language is our *HorseIR* language which is an extension of standard SQL. The Horse language is designed for data analytics with extended SQL features. At the current stage, we adopt execution plans from standard database SQL queries and MATLAB code. We provide a front end for parsing and transforming source code to HorseIR. After the optimization phases, multiple back-ends are supported. Static analyses and code optimizations are performed before the target code is generated. On the other hand, we provide an interpreter which allows running programs directly. In HorsePower, we focus on the following parts. - Design and implementation of array-based intermediate representation (IR) - Static analysis for an array-based IR (i.e. HorseIR) - Query optimizations with compiler optimizations - Fine-grained primitive functions and highly tuned libraries ## Installation Download the repository git clone git@github.com:Sable/HorsePower.git Setup [environment variables](https://github.com/Sable/HorsePower/blob/master/docs/readme.md) cd HorsePower && source ./setup_env.sh ### Setup Library Installation with the following command line (About 13 mins) (cd ${HORSE_LIB_FOLDER} && sh deploy_linux.sh) After installation, new folders created as follows. - include - lib - pcre2 Note, it is recommended to use gcc 8.1.0 or higher and additional library `uuid-dev` may be required during the installation. ### Setup Data Default data path for TPC-H ${HORSE_BASE}/data/tpch In order to generate different scale factor datasets, you should run cd data/tpch ./run.sh deploy ## Read instructions and update Makefile ./run.sh gendb 1 ## Generate database and save to data/tpch/db1 With a specific scale factor, for example, 1, its path is ${HORSE_BASE}/data/tpch/db1 It contains a `tbl` file for each table ${HORSE_BASE}/data/tpch/db1/*.tbl ### Build and Run You are recommended to use the latest version as this project is still under active development. To learn how to run, type (cd ${HORSE_SRC_CODE} && ./run.sh) # show usage ### A Brief Summary | Name | Notes | | :----------------------- | :------------------------------------- | | Platform | Cross-platform | | Tools | C/C++, Flex & Bison | | Parallelism | OpenMP/Pthread/CUDA/OpenCL | | Conventions | [docs/conventions](https://github.com/Sable/HorsePower/blob/master/docs/conventions) | ## Quick Entries IR design - [Official IR design notes](https://github.com/Sable/HorsePower/blob/master/docs/mkdocs/docs/horseir/) - [IR grammar in a yacc file (v3)](https://github.com/Sable/HorsePower/blob/master/src/horseir/v3/frontend/h.y) - [IR types and rules](https://github.com/Sable/HorsePower/blob/master/docs/horsetype): see also [specific type rules](https://github.com/Sable/HorsePower/blob/master/http://www.sable.mcgill.ca/~hanfeng.c/horse/docs/horseir/functions/) - [IR online reference](https://github.com/Sable/HorsePower/blob/master/http://www.sable.mcgill.ca/~hanfeng.c/horse/docs/horseir/) Database TPC-H - [TPC-H](https://github.com/Sable/HorsePower/blob/master/docs/tpch) - [TPC-H examples](https://github.com/Sable/HorsePower/blob/master/tests) Implementation - [Details](https://github.com/Sable/HorsePower/blob/master/docs/implementation) - [Project libraries](https://github.com/Sable/HorsePower/blob/master/libs/) ## Publications - Hanfeng Chen, Joseph Vinish Dsilva, Hongji Chen, Bettina Kemme, and Laurie Hendren, [HorseIR: Bringing Array Programming Languages together with Database Query Processing](https://github.com/Sable/HorsePower/blob/master/https://dl.acm.org/citation.cfm?id=3276951), Proceedings of the 14th Symposium on Dynamic Languages, ([DLS '18](https://github.com/Sable/HorsePower/blob/master/https://conf.researchr.org/track/dls-2018/dls-2018)), pp. 37-49, November 2018. + [BibTeX record on dblp](https://github.com/Sable/HorsePower/blob/master/https://dblp.uni-trier.de/rec/bibtex/conf/dls/ChenDCKH18) + [DLS18 artifact on GitHub](https://github.com/Sable/HorsePower/blob/master/https://github.com/Sable/dls18-analysis) ## Copyright and License Copyright © 2017-2020, Hanfeng Chen, Laurie Hendren and McGill University. - PCRE2: [PCRE2 Licence](https://github.com/Sable/HorsePower/blob/master/docs/license/pcre2.txt)

近期下载者

相关文件


收藏者