Download TPC-H Tools
http://www.tpc.org/tpch/
1 modify the Makefile
Unzip the TPCH file and enter the dbgen directory.
cp makefile.suite makefile
Open the Makefile, find and modify the following lines (103~111)
################
## CHANGE NAME OF ANSI COMPILER HERE
################
CC = gcc
# Current values for DATABASE are: INFORMIX, DB2, TDAT (Teradata)
# SQLSERVER, SYBASE, ORACLE, VECTORWISE
# Current values for MACHINE are: ATT, DOS, HP, IBM, ICL, MVS,
# SGI, SUN, U2200, VMS, LINUX, WIN32
# Current values for WORKLOAD are: TPCH
DATABASE= SQLSERVER
MACHINE = LINUX
WORKLOAD = TPCH
2 compile
make
Because my computer is a Mac, I made an error compiling DBgen:
bm_utils.c:71:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
^~~~~~~~~~
1 error generated.
make: *** [bm_utils.o] Error 1 # varsub.o
In the file where the error will be reported:
#include <malloc.h>
Modified to
#include <sys/malloc.h>
Done.
3 Generating data
./dbgen -s 1 -f
Convert.tbl data into CSV:
for I in 'ls *. TBL'; do sed 's/|$//' $i > ${i/tbl/csv}; echo $i; done;
4 Generate query data
Open failed for./1. SQL at qgen. C :170
Environment variable needs to be set: export DSS_QUERY=PATH_TO_QUERIES_FOLDER
generally, type export DSS_QUERY=queries
Mac does not have vmstat. Change vmstat in TpCH.sh to VM_stat
Read More:
- About the problem of calling tools library by running Python program under Mac OS X, modulenotfoundererror: no module named ‘tools‘
- Compiling OBS studio on MAC and windos platforms
- failed to find Build Tools revision 23.0.2 Install Build Tools 23.0.2 and sync project
- Mac: how to show hidden files under Apple Mac operating system
- How to Fix Install VMware Tools Grayed out Issues 2022
- MySQL driver compiling method of QT under windows and solutions to abnormal errors
- Vs2013 compiling ffmpeg
- Initctl: Job failed to start appears when installing VMware-tools
- [problem record] installed build tools revision 31.0.0 is broken during Android studio compilation
- Failed to find Build Tools revision 25.0.2
- Failed to find Build Tools revision 27.0.3
- gradle:failed to find Build Tools revision 29.0.2
- [actual record of Android stepping on the pit] Android studio runs with errors. Installed build tools revision 31 is broken
- [VTK] cmake compiling VTK
- Project error – failed to find build tools revision 26.0.1
- Ffmpeg (libx264) compiling for IOS
- Vs2012 compiling PCL dependency library vtk7.0
- 2021-07-27 Android studio:Installed build tools revision 31.0.0 is corrupted.Remove and install ag
- Methods of compiling and installing ffmpeg and libx264 in Linux
- Xcode12 error in compiling cocos2d [How to Solve]