1

I'm using Postgres 11 with timescaleDB in a LINUX machine(16 cores and 32 RAM). I have following 2 tables and only one is the time column.

  1. usersTransations (time timestamp without time zone, userId String, locationID string)
  2. location (locationID string, longitude double, latitude double )

This usersTransations is a hypertable with 24 Chunks which has created for 1 hour interval. and location is a Postgres table. I have created index on locationID (with time column). usersTransations table is very large about 1 billion records. I used following query to join above 2 tables but it take a very large time.

SELECT *
FROM usersTransations
LEFT JOIN location ON location."locationID"= usersTransations."locationID"

Is there any way to optimise join queries in TimescaleDB?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
AYD
  • 21
  • 3

0 Answers0