explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BPU6

Settings
# exclusive inclusive rows x rows loops node
1. 2.884 30.636 ↓ 2.4 2,164 1

Nested Loop (cost=0.00..6,034.31 rows=913 width=124) (actual time=0.166..30.636 rows=2,164 loops=1)

2. 22.332 22.332 ↑ 1.9 271 1

Seq Scan on metrics_labels l (cost=0.00..3,006.70 rows=525 width=80) (actual time=0.147..22.332 rows=271 loops=1)

  • Filter: ((labels ->> 'cms_id'::text) = '11022111'::text)
  • Rows Removed by Filter: 105429
3. 2.168 5.420 ↓ 1.3 8 271

Append (cost=0.00..5.70 rows=6 width=20) (actual time=0.005..0.020 rows=8 loops=271)

4. 0.000 0.000 ↓ 0.0 0 271

Seq Scan on metrics_values m (cost=0.00..0.00 rows=1 width=20) (actual time=0.000..0.000 rows=0 loops=271)

  • Filter: (("time" >= '2019-04-10 12:30:16.813-07'::timestamp with time zone) AND ("time" <= '2019-04-11 12:30:16.813-07'::timestamp with time zone) AND (l.id = labels_id))
5. 1.084 1.084 ↓ 2.0 2 271

Index Scan using _hyper_48_188_chunk_metrics_values_labels_id_idx on _hyper_48_188_chunk m_1 (cost=0.42..2.24 rows=1 width=20) (actual time=0.003..0.004 rows=2 loops=271)

  • Index Cond: ((labels_id = l.id) AND ("time" >= '2019-04-10 12:30:16.813-07'::timestamp with time zone) AND ("time" <= '2019-04-11 12:30:16.813-07'::timestamp with time zone))
6. 2.168 2.168 ↓ 1.5 6 271

Index Scan using _hyper_48_196_chunk_metrics_values_labels_id_idx on _hyper_48_196_chunk m_2 (cost=0.42..3.46 rows=4 width=20) (actual time=0.003..0.008 rows=6 loops=271)

  • Index Cond: ((labels_id = l.id) AND ("time" >= '2019-04-10 12:30:16.813-07'::timestamp with time zone) AND ("time" <= '2019-04-11 12:30:16.813-07'::timestamp with time zone))