Code Monkey home page Code Monkey logo

tpch-postgres's Introduction

Since data.gz exceeds the largest size github allows, I have to use git lfs to store it. so you have to install git-lfs before clone it.

How can it be used?

  1. Load the schema and data.
tar -xf data.gz
psql -a {your_db_name} -f data.sql
psql -a {your_db_name} -c "analyze;"
  1. Get the execution plan and run-time statistics with the original pg version. You might want to run twice to avoid the io impacts.
psql -a {db_name} -f explain.analyze.sql > explain.analyze.normal.log
  1. Snapshot the current result with the original pg version
psql -a {dbname} -f capture.result.sql 
  1. apply the patch you want to test.
  2. run explain.analyze.sql again and compare the result
  3. run diff.sql to compare the result with the previous snapshot. The expect is every query return 0 rows (no difference)

Note:

  1. The size of data.gz is about 307MB, so it may take some time to clone this repo.
  2. If you want to build more analysis script, you can check generate_derived_sql.py first.

I didn't spend much time on this, if you find any issue/improvements, just open an issue. Thanks

[1] https://ankane.org/tpc-h

tpch-postgres's People

Contributors

zhihuifan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.