timescale / tsbs

Time Series Benchmark Suite, a tool for comparing and evaluating databases for time series data
MIT License
1.29k stars 300 forks source link

Add timescaledb extension to plain postgres db. (maybe an option?) #35

Closed did-g closed 5 years ago

did-g commented 5 years ago

Hi,

When benchmarking timescaledb vs pg using the same requests is interesting, but requests with time_bucket need timescaledb extension.

Something like


--- a/cmd/tsbs_load_timescaledb/creator.go
+++ b/cmd/tsbs_load_timescaledb/creator.go
@@ -133,8 +133,8 @@ func (d *dbCreator) CreateDB(dbName string) error {
                        dbBench.MustExec(idxDef)
                }

+               dbBench.MustExec("CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE")
                if useHypertable {
-                       dbBench.MustExec("CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE")
                        dbBench.MustExec(
                                fmt.Sprintf("SELECT create_hypertable('%s'::regclass, 'time'::name, partitioning_column => '%s'::name, number_partitions => %v::smallint, chu`

timescaledb hook add a small overhead but it's trivial.

Regards Didier

RobAtticus commented 5 years ago

This is a good change, and I have wanted to make sure that we can be tested on plain PostgreSQL as we were before (for our blog post). I'll definitely keep this in mind. If you want to make a PR for the small patch you have there and leave the time_bucket change for someone else, that's good too.

RobAtticus commented 5 years ago

Closing this thanks to PR #49 being merged