Thach Nguyen
Thach Nguyen

Reputation: 51

TimescalDB is slower than pure PostgreSQL

I setup TimescaleDB and Postgresql for testing performance on time-serial data. I have successful setup the hyper table. I test with inserted 2M rows from my C# program. But the TimescaleDB is process totally slower than pure Postgresql. Even with the TimescaleDB my program did not response after it insert some hundred records. I don't know why. Can anyone give me a hint? Or am I missing something?

Upvotes: 4

Views: 2204

Answers (1)

Lee Hampton
Lee Hampton

Reputation: 460

We will need a bit more information in order to pinpoint what issues you're running into. If TimescaleDB is not responding at all after inserting a few hundred records, it sounds like something is definitely misconfigured, either on the database or the system level. Is the client simply timing out, or is it accompanied with some kind of error? If the process is hanging, do you have any insight into what the system is doing during this time (e.g., is there a lot of IO, is CPU maxed out?). Are you seeing any locks in contention when this happens (see Postgres Lock Monitoring? It would also be good to see your data model and how your TimescaleDB hypertable was created.

Also, note that TimescaleDB will not necessarily outperform Postgres with a low number of rows and single row inserts. TimescaleDB shines when you hit tens of millions of rows or more and insert in batches. See the PostgreSQL vs TimescaleDB Blog Post for more information.

Upvotes: 2

Related Questions