explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JgFr

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.174 ↑ 1.0 1 1

0 = "Limit (cost=139.19..832.79 rows=1 width=4) (actual time=0.172..0.174 rows=1 loops=1)

  • Output: serviceren0_.bdate
  • Buffers: shared hit=163
2. 0.003 0.172 ↑ 1.0 1 1

Nested Loop (cost=139.19..832.79 rows=1 width=4) (actual time=0.171..0.172 rows=1 loops=1)

  • Output: serviceren0_.bdate
  • Inner Unique: true
  • Join Filter: (servicepro4_.srv_prototype_id = servicepro5_.id)
  • Buffers: shared hit=163
3. 0.000 0.167 ↑ 1.0 1 1

Nested Loop (cost=138.91..828.13 rows=1 width=16) (actual time=0.167..0.167 rows=1 loops=1)

  • Output: serviceren0_.bdate, service1_.prototype_id, servicepro2_.id, servicepro4_.srv_prototype_id
  • Buffers: shared hit=160
4. 0.022 0.160 ↑ 1.0 1 1

Hash Join (cost=138.91..826.94 rows=1 width=20) (actual time=0.159..0.160 rows=1 loops=1)

  • Output: serviceren0_.bdate, service1_.prototype_id, servicepro2_.id, servicepro4_.control_parameter_id, servicepro4_.srv_prototype_id
  • Hash Cond: (serviceren0_.service_id = service1_.id)
  • Buffers: shared hit=159
5. 0.074 0.074 ↑ 1.5 113 1

Index Scan using sr_srv_rendered_customer_id_idx on public.sr_srv_rendered serviceren0_ (cost=0.56..687.95 rows=171 width=8) (actual time=0.010..0.074 rows=113 loops=1)

  • Output: serviceren0_.id, serviceren0_.bdate, serviceren0_.comment, serviceren0_.cost, serviceren0_.duration, serviceren0_.edate, serviceren0_.is_rendered, serviceren0_.quantity, serviceren0_.total_cost, serviceren0_.contract_id, serviceren0_.customer_id, serviceren0_.funding_id, serviceren0_.res_group_id, serviceren0_.service_id, serviceren0_.duration_measure_unit_id, serviceren0_.begin_time, serviceren0_.prototype_id, serviceren0_.org_id, serviceren0_.price_list_id, serviceren0_.cul, serviceren0_.parent_id, serviceren0_.payment_status_id, serviceren0_.root_service_id, serviceren0_.is_wholly_rendered, serviceren0_.planned_date, serviceren0_.planned_time, serviceren0_.tooth_number, serviceren0_.is_refused, serviceren0_.aud_who, serviceren0_.aud_when, serviceren0_.aud_source, serviceren0_.aud_who_create, serviceren0_.aud_when_create, serviceren0_.aud_source_create, serviceren0_.is_amalgam_filling, serviceren0_.is_mobile_medical_teams, serviceren0_.close_date, se
  • Index Cond: (serviceren0_.customer_id = 1,726,756)
  • Buffers: shared hit=117
6. 0.006 0.064 ↑ 1.2 38 1

Hash (cost=137.77..137.77 rows=46 width=20) (actual time=0.064..0.064 rows=38 loops=1)

  • Output: service1_.id, service1_.prototype_id, servicepro2_.id, servicepro4_.control_parameter_id, servicepro4_.srv_prototype_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=42
7. 0.012 0.058 ↑ 1.2 38 1

Nested Loop (cost=0.71..137.77 rows=46 width=20) (actual time=0.023..0.058 rows=38 loops=1)

  • Output: service1_.id, service1_.prototype_id, servicepro2_.id, servicepro4_.control_parameter_id, servicepro4_.srv_prototype_id
  • Join Filter: (servicepro4_.srv_prototype_id = service1_.prototype_id)
  • Buffers: shared hit=42
8. 0.008 0.025 ↓ 3.0 3 1

Nested Loop (cost=0.29..9.48 rows=1 width=12) (actual time=0.017..0.025 rows=3 loops=1)

  • Output: servicepro2_.id, servicepro4_.control_parameter_id, servicepro4_.srv_prototype_id
  • Inner Unique: true
  • Buffers: shared hit=10
9. 0.011 0.011 ↓ 3.0 3 1

Seq Scan on public.pci_control_param_service servicepro4_ (cost=0.00..1.18 rows=1 width=8) (actual time=0.011..0.011 rows=3 loops=1)

  • Output: servicepro4_.control_parameter_id, servicepro4_.srv_prototype_id, servicepro4_.aud_who, servicepro4_.aud_when, servicepro4_.aud_source, servicepro4_.aud_who_create, servicepro4_.aud_when_create, servicepro4_.aud_source_create
  • Filter: (servicepro4_.control_parameter_id = 35)
  • Rows Removed by Filter: 27
  • Buffers: shared hit=1
10. 0.006 0.006 ↑ 1.0 1 3

Index Only Scan using sr_srv_prototype_pk on public.sr_srv_prototype servicepro2_ (cost=0.29..8.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=3)

  • Output: servicepro2_.id
  • Index Cond: (servicepro2_.id = servicepro4_.srv_prototype_id)
  • Heap Fetches: 3
  • Buffers: shared hit=9
11. 0.021 0.021 ↑ 4.5 13 3

Index Scan using sr_service_prototype_id_idx on public.sr_service service1_ (cost=0.42..127.56 rows=58 width=8) (actual time=0.003..0.007 rows=13 loops=3)

  • Output: service1_.id, service1_.code, service1_.cul, service1_.is_death, service1_.duration, service1_.is_fictitious, service1_.is_independent, service1_.is_multuplicity, service1_.name, service1_.terms, service1_.org_id, service1_.category_id, service1_.duration_unit_id, service1_.prototype_id, service1_.type_id, service1_.from_dt, service1_.to_dt, service1_.is_repeated, service1_.is_inherit_protocol, service1_.is_expendable_materials, service1_.is_actual_cul, service1_.is_paraclinical, service1_.is_complex, service1_.accounting_id, service1_.is_fact, service1_.is_autocopy_diagnoses, service1_.is_stomat, service1_.srg_dif_type_id, service1_.srg_opr_kind_id, service1_.is_need_anatomic_zone, service1_.aud_who, service1_.aud_when, service1_.aud_source, service1_.aud_who_create, service1_.aud_when_create, service1_.aud_source_create, service1_.is_filling, service1_.is_extraction, service1_.is_need_close_date, service1_.is_vmp, service1_.short_name
  • Index Cond: (service1_.prototype_id = servicepro2_.id)
  • Buffers: shared hit=32
12. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on public.pci_control_parameter controlpar3_ (cost=0.00..1.18 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1)

  • Output: controlpar3_.id, controlpar3_.is_query, controlpar3_.is_available, controlpar3_.code, controlpar3_.name, controlpar3_.query_text, controlpar3_.service_parameter, controlpar3_.clinic_id, controlpar3_.aud_who, controlpar3_.aud_when, controlpar3_.aud_source, controlpar3_.aud_who_create, controlpar3_.aud_when_create, controlpar3_.aud_source_create
  • Filter: (controlpar3_.id = 35)
  • Rows Removed by Filter: 19
  • Buffers: shared hit=1
13. 0.002 0.002 ↑ 1.0 1 1

Index Only Scan using sr_srv_prototype_pk on public.sr_srv_prototype servicepro5_ (cost=0.29..4.65 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)

  • Output: servicepro5_.id
  • Index Cond: (servicepro5_.id = service1_.prototype_id)
  • Heap Fetches: 1
  • Buffers: shared hit=3