explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WbpO

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 13,000.955 ↑ 11.0 1 1

Limit (cost=1,951.94..2,475.77 rows=11 width=0) (actual time=1,423.838..13,000.955 rows=1 loops=1)

  • Output: (1)
  • Buffers: shared hit=105017 read=1084912
  • I/O Timings: read=4370.020
2. 0.035 13,000.953 ↑ 50,529.0 1 1

Nested Loop (cost=1,951.94..2,408,202.21 rows=50,529 width=0) (actual time=1,423.837..13,000.953 rows=1 loops=1)

  • Output: 1
  • Buffers: shared hit=105017 read=1084912
  • I/O Timings: read=4370.020
3. 118.019 13,000.887 ↑ 52,266.0 1 1

Hash Join (cost=1,951.37..2,184,226.59 rows=52,266 width=8) (actual time=1,423.774..13,000.887 rows=1 loops=1)

  • Output: ssr.res_group_id, srgr.group_id
  • Hash Cond: (ssr.res_group_id = srgr.group_id)
  • Buffers: shared hit=105012 read=1084912
  • I/O Timings: read=4370.020
4. 12,882.208 12,882.208 ↑ 1.2 461,810 1

Seq Scan on public.sr_srv_rendered ssr (cost=0.00..2,179,789.16 rows=563,879 width=4) (actual time=1.790..12,882.208 rows=461,810 loops=1)

  • Output: ssr.id, ssr.bdate, ssr.comment, ssr.cost, ssr.duration, ssr.edate, ssr.is_rendered, ssr.quantity, ssr.total_cost, ssr.contract_id, ssr.customer_id, ssr.funding_id, ssr.res_group_id, ssr.service_id, ssr.duration_measure_unit_id, ssr.begin_time, ssr.prototype_id, ssr.org_id, ssr.price_list_id, ssr.cul, ssr.parent_id, ssr.payment_status_id, ssr.root_service_id, ssr.is_wholly_rendered, ssr.planned_date, ssr.planned_time, ssr.tooth_number, ssr.is_refused, ssr.aud_who, ssr.aud_when, ssr.aud_source, ssr.aud_who_create, ssr.aud_when_create, ssr.aud_source_create, ssr.is_amalgam_filling, ssr.is_mobile_medical_teams, ssr.close_date, ssr.complex_srv_id, ssr.for_upload, ssr.uid, ssr.is_need_consulting
  • Filter: ((ssr.bdate >= '2018-09-20'::date) AND (ssr.bdate <= '2018-09-30'::date))
  • Rows Removed by Filter: 65539941
  • Buffers: shared hit=104851 read=1084912
  • I/O Timings: read=4370.020
5. 0.105 0.660 ↑ 33.4 640 1

Hash (cost=1,684.57..1,684.57 rows=21,344 width=4) (actual time=0.660..0.660 rows=640 loops=1)

  • Output: srgr.group_id
  • Buckets: 32768 Batches: 1 Memory Usage: 279kB
  • Buffers: shared hit=161
6. 0.238 0.555 ↑ 33.4 640 1

HashAggregate (cost=1,471.13..1,684.57 rows=21,344 width=4) (actual time=0.459..0.555 rows=640 loops=1)

  • Output: srgr.group_id
  • Group Key: srgr.group_id
  • Buffers: shared hit=161
7. 0.073 0.317 ↑ 33.2 643 1

Nested Loop (cost=0.86..1,417.77 rows=21,344 width=4) (actual time=0.035..0.317 rows=643 loops=1)

  • Output: srgr.group_id
  • Buffers: shared hit=161
8. 0.015 0.015 ↑ 1.0 1 1

Index Scan using employee_position_id_unique on public.pim_employee_position_resource pepr1 (cost=0.29..8.30 rows=1 width=4) (actual time=0.014..0.015 rows=1 loops=1)

  • Output: pepr1.id, pepr1.employee_position_id, pepr1.aud_who, pepr1.aud_when, pepr1.aud_source, pepr1.aud_who_create, pepr1.aud_when_create, pepr1.aud_source_create
  • Index Cond: (pepr1.employee_position_id = 87510)
  • Buffers: shared hit=3
9. 0.229 0.229 ↑ 33.2 643 1

Index Only Scan using sr_res_group_relationship_resource_id_group_id_ix on public.sr_res_group_relationship srgr (cost=0.57..1,196.02 rows=21,344 width=8) (actual time=0.016..0.229 rows=643 loops=1)

  • Output: srgr.resource_id, srgr.group_id
  • Index Cond: (srgr.resource_id = pepr1.id)
  • Heap Fetches: 50
  • Buffers: shared hit=158
10. 0.031 0.031 ↑ 1.0 1 1

Index Only Scan using sr_res_group_pk on public.sr_res_group srg (cost=0.57..4.28 rows=1 width=4) (actual time=0.030..0.031 rows=1 loops=1)

  • Output: srg.id
  • Index Cond: (srg.id = ssr.res_group_id)
  • Heap Fetches: 0
  • Buffers: shared hit=5