explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cT33

Settings
# exclusive inclusive rows x rows loops node
1. 125.822 440.938 ↑ 50,529.0 1 1

Hash Join (cost=107,279.94..1,094,765.92 rows=50,529 width=0) (actual time=303.141..440.938 rows=1 loops=1)

  • Output: 1
  • Hash Cond: (ssr.res_group_id = srg.id)
  • Buffers: shared hit=57521
2. 212.641 309.973 ↑ 1.2 461,810 1

Bitmap Heap Scan on public.sr_srv_rendered ssr (cost=12,872.32..998,242.43 rows=563,879 width=4) (actual time=113.186..309.973 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
  • Recheck Cond: ((ssr.bdate >= '2018-09-20'::date) AND (ssr.bdate <= '2018-09-30'::date))
  • Heap Blocks: exact=52754
  • Buffers: shared hit=54135
3. 97.332 97.332 ↑ 1.2 462,028 1

Bitmap Index Scan on sr_srv_rendered_bdate_org_ix (cost=0.00..12,731.36 rows=563,879 width=0) (actual time=97.332..97.332 rows=462,028 loops=1)

  • Index Cond: ((ssr.bdate >= '2018-09-20'::date) AND (ssr.bdate <= '2018-09-30'::date))
  • Buffers: shared hit=1381
4. 0.271 5.143 ↑ 33.4 640 1

Hash (cost=94,140.81..94,140.81 rows=21,344 width=8) (actual time=5.143..5.143 rows=640 loops=1)

  • Output: srg.id, srgr.group_id
  • Buckets: 32768 Batches: 1 Memory Usage: 281kB
  • Buffers: shared hit=3386
5. 0.128 4.872 ↑ 33.4 640 1

Nested Loop (cost=1,471.70..94,140.81 rows=21,344 width=8) (actual time=0.720..4.872 rows=640 loops=1)

  • Output: srg.id, srgr.group_id
  • Buffers: shared hit=3386
6. 0.443 0.904 ↑ 33.4 640 1

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

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

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

  • Output: srgr.group_id
  • Buffers: shared hit=161
8. 0.034 0.034 ↑ 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.033..0.034 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.322 0.322 ↑ 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.037..0.322 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. 3.840 3.840 ↑ 1.0 1 640

Index Only Scan using sr_res_group_pk on public.sr_res_group srg (cost=0.57..4.32 rows=1 width=4) (actual time=0.005..0.006 rows=1 loops=640)

  • Output: srg.id
  • Index Cond: (srg.id = srgr.group_id)
  • Heap Fetches: 46
  • Buffers: shared hit=3225