https://github.com/jackc/writable-cte-examples
Examples of Writable Common Table Expressions in PostgreSQL
https://github.com/jackc/writable-cte-examples
Last synced: 9 months ago
JSON representation
Examples of Writable Common Table Expressions in PostgreSQL
- Host: GitHub
- URL: https://github.com/jackc/writable-cte-examples
- Owner: jackc
- Archived: true
- Created: 2013-08-12T20:06:13.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-12T20:09:31.000Z (about 12 years ago)
- Last Synced: 2025-02-11T11:42:33.724Z (9 months ago)
- Language: Ruby
- Size: 102 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setup
From the writable-cte-examples directory:
bundle
Assuming you have a local PostgreSQL install run the following:
createdb writable_cte_bench
psql writable_cte_bench < structure.sql
If your PostgreSQL server is not on your local machine you will also need to adjust the connection settings in writable_cte_bench.rb
# Running Benchmarks
bundle exec ruby writable_cte_bench.rb
bundle exec time ruby merge_naive.rb
bundle exec time ruby merge_sql.rb