explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AzXO

Settings
# exclusive inclusive rows x rows loops node
1. 2.866 10.462 ↓ 11.8 2,164 1

Nested Loop (cost=84.54..1,027.09 rows=183 width=124) (actual time=1.947..10.462 rows=2,164 loops=1)

2. 0.266 2.176 ↓ 2.6 271 1

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

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

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

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

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

5. 0.271 0.271 ↓ 0.0 0 271

Index Scan using metrics_values_labels_id_idx on metrics_values m (cost=0.12..0.17 rows=1 width=20) (actual time=0.001..0.001 rows=0 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. 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.56 rows=1 width=20) (actual time=0.002..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))
7. 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..5.13 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))
Planning time : 0.515 ms
Execution time : 11.297 ms