explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zdMv

Settings
# exclusive inclusive rows x rows loops node
1. 0.058 97.746 ↑ 1.0 1 1

Aggregate (cost=5,566.17..5,566.18 rows=1 width=136) (actual time=97.746..97.746 rows=1 loops=1)

2. 0.047 97.688 ↓ 4.0 4 1

Nested Loop (cost=5,509.86..5,566.13 rows=1 width=56) (actual time=97.595..97.688 rows=4 loops=1)

  • Join Filter: ((a.stats_container_id = u.stats_container_id) AND ((a.data_written_size_bytes)::numeric <= (sum(v.unmorphed_usage_bytes))) AND ((sum(v.unmorphed_usage_bytes)) <= ((a.source_delta_size_bytes)::numeric * 1.05)))
  • Rows Removed by Join Filter: 68
3. 0.118 52.773 ↓ 12.0 12 1

Bitmap Heap Scan on protection_job_run_entities a (cost=2,722.41..2,778.62 rows=1 width=24) (actual time=52.747..52.773 rows=12 loops=1)

  • Recheck Cond: ((job_id = 2340) AND (entity_id = 102))
  • Filter: ((start_time_usecs >= '1578502213755482'::bigint) AND (start_time_usecs <= '1581094213755482'::bigint))
  • Rows Removed by Filter: 7
  • Heap Blocks: exact=15
4. 0.167 52.655 ↓ 0.0 0 1

BitmapAnd (cost=2,722.41..2,722.41 rows=14 width=0) (actual time=52.655..52.655 rows=0 loops=1)

5. 1.816 1.816 ↑ 1,155.7 19 1

Bitmap Index Scan on protection_job_run_entities_n3 (cost=0.00..413.26 rows=21,959 width=0) (actual time=1.816..1.816 rows=19 loops=1)

  • Index Cond: (job_id = 2340)
6. 50.672 50.672 ↑ 1.1 113,750 1

Bitmap Index Scan on protection_job_run_entities_n5 (cost=0.00..2,308.89 rows=122,710 width=0) (actual time=50.672..50.672 rows=113,750 loops=1)

  • Index Cond: (entity_id = 102)
7. 0.096 44.868 ↓ 6.0 6 12

GroupAggregate (cost=2,787.45..2,787.47 rows=1 width=70) (actual time=3.734..3.739 rows=6 loops=12)

  • Group Key: u.cluster_identifier, u.stats_container_id
8. 0.132 44.772 ↓ 22.0 22 12

Sort (cost=2,787.45..2,787.45 rows=1 width=46) (actual time=3.730..3.731 rows=22 loops=12)

  • Sort Key: u.stats_container_id
  • Sort Method: quicksort Memory: 26kB
9. 0.147 44.640 ↓ 22.0 22 1

Nested Loop (cost=2,723.12..2,787.44 rows=1 width=46) (actual time=36.042..44.640 rows=22 loops=1)

10. 0.287 32.205 ↓ 12.0 12 1

Bitmap Heap Scan on protection_job_run_entities u (cost=2,722.41..2,778.69 rows=1 width=46) (actual time=31.947..32.205 rows=12 loops=1)

  • Recheck Cond: ((job_id = 2340) AND (entity_id = 102))
  • Filter: ((is_full_backup IS NULL) AND (source_delta_size_bytes > 0) AND (data_written_size_bytes > 0) AND ((cluster_identifier)::text = '998663406507174:1556895109547'::text) AND (status = 4))
  • Rows Removed by Filter: 7
  • Heap Blocks: exact=15
11. 0.073 31.918 ↓ 0.0 0 1

BitmapAnd (cost=2,722.41..2,722.41 rows=14 width=0) (actual time=31.918..31.918 rows=0 loops=1)

12. 0.042 0.042 ↑ 1,155.7 19 1

Bitmap Index Scan on protection_job_run_entities_n3 (cost=0.00..413.26 rows=21,959 width=0) (actual time=0.042..0.042 rows=19 loops=1)

  • Index Cond: (job_id = 2340)
13. 31.803 31.803 ↑ 1.1 113,750 1

Bitmap Index Scan on protection_job_run_entities_n5 (cost=0.00..2,308.89 rows=122,710 width=0) (actual time=31.802..31.803 rows=113,750 loops=1)

  • Index Cond: (entity_id = 102)
14. 12.288 12.288 ↓ 2.0 2 12

Index Scan using protection_job_run_containerstats_n1 on protection_job_run_containerstats v (cost=0.71..8.74 rows=1 width=54) (actual time=0.958..1.024 rows=2 loops=12)

  • Index Cond: ((cluster_identifier = '998663406507174:1556895109547'::text) AND (entity_id = u.stats_container_id) AND (ts < (to_timestamp(((((u.start_time_usecs)::numeric / 1000000.0) + 900.00))::double precision))::timestamp without time zone))
Planning time : 3.819 ms
Execution time : 98.069 ms