explain.depesz.com

PostgreSQL's explain analyze made readable

Result: D7Mm

Settings
# exclusive inclusive rows x rows loops node
1. 2.641 13.652 ↓ 11.8 2,164 1

Nested Loop (cost=84.41..1,009.40 rows=183 width=124) (actual time=2.353..13.652 rows=2,164 loops=1)

2. 0.317 2.610 ↓ 2.6 271 1

Bitmap Heap Scan on metrics_labels l (cost=84.41..195.20 rows=105 width=80) (actual time=2.305..2.610 rows=271 loops=1)

  • Recheck Cond: (labels @> '{"cms_id": "11022111"}'::jsonb)
  • Heap Blocks: exact=45
3. 2.293 2.293 ↓ 2.6 271 1

Bitmap Index Scan on metrics_labels_labels_idx (cost=0.00..84.39 rows=105 width=0) (actual time=2.293..2.293 rows=271 loops=1)

  • Index Cond: (labels @> '{"cms_id": "11022111"}'::jsonb)
4. 2.439 8.401 ↓ 1.3 8 271

Append (cost=0.00..7.69 rows=6 width=20) (actual time=0.007..0.031 rows=8 loops=271)

5. 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))
6. 2.168 2.168 ↓ 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.56 rows=1 width=20) (actual time=0.004..0.008 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))
7. 3.794 3.794 ↓ 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..5.13 rows=4 width=20) (actual time=0.004..0.014 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))
Planning time : 0.478 ms
Execution time : 14.536 ms