-1

So we got multiple Timescale Hypertables on our PSQL Cluster. I try to optimize the tables in the last time. Our Background: the Tables are around 300 - 500GB in size. Normally we will use queries that will look up the timestamp in the first place. So the queries look like "Select timestamp, id_device, value1 from table where id_device = 'device1'...".

I deleted all old contraints/indexes and created a new PKEY with "(timestamp, id_device)". So my question: is it useful to create an index on this hypertable with the same format as the PKEY?

The Timescale Docs describe the best index for our Usecase as "(timestamp DESC, id_device)". But im not sure if its helpful, because the old indexes where > 20GB in size.

New contributor
OGlass is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • What is the query you intend to speed up with the index? Jan 14 at 7:56

Your Answer

OGlass is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.