Below is my query. I am trying to get it to use an index scan, but it will only seq scan.
By the way the metric_data table has 130 million rows. The
metric_data
Have you tried to use:
WHERE S.NAME = ANY (VALUES ('cpu'), ('mem')) instead of ARRAY
like here