Native postgres version faster than timescaledb - upserts and reads (version 2.16.1)

Hi!

I recently wrote benchmarks for comparing the read and upsert speeds between postgres and postgres with timescaledb, and 2 additional databases (all containerized).

The results, code, EXPLAIN ANALYZE logs and commands for running the benchmarks are available here.

The code which does the benchmarks between timescale and native postgres is pretty much identical, the only real thing that is different is the create_hypertable command which gets executed for the timescale version.

More details about the benchmarks are included in the readme.

Could someone help me understand where I made a mistake in these benchmarks? Notably, what could be the reason for the difference between the read speed comparison between golang and the explain analyze queries.

I’m assuming that I did not tune the hypertables fully to increase performance (meaning, specifying the optional parameters when creating them). Or maybe the primary keys for the tables should be specified in a different way?

Hi @tompston, we got a similar issue with Ali’s benchmark on 1 trillion rows and you can see the hackernews discussions here.

It seems like by default, hypertable will also process some extra indices that will also make it a bit slower but faster for querying.

You can test with create_default_indexes=>false.