explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EucD

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 14,789.074 ↓ 0.0 0 1

Limit (cost=0.43..3,876.78 rows=25 width=266) (actual time=14,789.074..14,789.074 rows=0 loops=1)

  • Output: service0_.id, service0_.accounting_id, service0_.is_actual_cul, service0_.is_autocopy_diagnoses, service0_.is_blocked_for_waitlist, service0_.code, service0_.is_complex, service0_.cul, service0_.is_death, service0_.duration, service0_.is_expendable_materials, service0_.is_fictitious, service0_.from_dt, service0_.is_independent, service0_.is_inherit_protocol, service0_.is_extraction, service0_.is_filling, service0_.is_stomat, service0_.is_vmp, service0_.is_multuplicity, service0_.name, service0_.is_need_anatomic_zone, service0_.is_need_close_date, service0_.org_id, service0_.is_paraclinical, service0_.is_repeated, service0_.category_id, service0_.duration_unit_id, service0_.prototype_id, service0_.type_id, service0_.short_name, service0_.srg_dif_type_id, service0_.srg_opr_kind_id, service0_.terms, service0_.to_dt
  • Buffers: shared hit=674,539 read=83,624 dirtied=228
  • I/O Timings: read=5,114.426
2. 14,785.312 14,789.066 ↓ 0.0 0 1

Index Scan using sr_service_pkey on public.sr_service service0_ (cost=0.43..16,900,606.73 rows=108,998 width=266) (actual time=14,789.066..14,789.066 rows=0 loops=1)

  • Output: service0_.id, service0_.accounting_id, service0_.is_actual_cul, service0_.is_autocopy_diagnoses, service0_.is_blocked_for_waitlist, service0_.code, service0_.is_complex, service0_.cul, service0_.is_death, service0_.duration, service0_.is_expendable_materials, service0_.is_fictitious, service0_.from_dt, service0_.is_independent, service0_.is_inherit_protocol, service0_.is_extraction, service0_.is_filling, service0_.is_stomat, service0_.is_vmp, service0_.is_multuplicity, service0_.name, service0_.is_need_anatomic_zone, service0_.is_need_close_date, service0_.org_id, service0_.is_paraclinical, service0_.is_repeated, service0_.category_id, service0_.duration_unit_id, service0_.prototype_id, service0_.type_id, service0_.short_name, service0_.srg_dif_type_id, service0_.srg_opr_kind_id, service0_.terms, service0_.to_dt
  • Filter: ((('now'::cstring)::date >= COALESCE(service0_.from_dt, '-infinity'::date)) AND (('now'::cstring)::date <= COALESCE(service0_.to_dt, 'infinity'::date)) AND ((service0_.org_id <> ALL ('{5583236,5583220,5583687,5583218,5583287,5583193,9898460,5583222,5583800,5583225}'::integer[])) OR (service0_.org_id = 490) OR (service0_.org_id = 490)) AND ((upper((service0_.name)::text) ~~ '%АВТОТЕСТ-УСЛУГА%'::text) OR (upper((service0_.code)::text) ~~ '%АВТОТЕСТ-УСЛУГА%'::text) OR (alternatives: SubPlan 1 or hashed SubPlan 2)))
  • Rows Removed by Filter: 1,989,377
  • Buffers: shared hit=674,539 read=83,624 dirtied=228
  • I/O Timings: read=5,114.426
3.          

SubPlan (for Index Scan)

4. 0.000 0.000 ↓ 0.0 0

Index Scan using sr_srv_service_synonym_service_id_idx on public.sr_srv_service_synonym servicesyn2_ (cost=0.28..8.30 rows=1 width=0) (never executed)

  • Index Cond: (service0_.id = servicesyn2_.service_id)
  • Filter: (upper((servicesyn2_.name)::text) ~~ '%АВТОТЕСТ-УСЛУГА%'::text)
5. 3.754 3.754 ↓ 0.0 0 1

Seq Scan on public.sr_srv_service_synonym servicesyn2__1 (cost=0.00..41.77 rows=1 width=4) (actual time=3.754..3.754 rows=0 loops=1)

  • Output: servicesyn2__1.service_id
  • Filter: (upper((servicesyn2__1.name)::text) ~~ '%АВТОТЕСТ-УСЛУГА%'::text)
  • Rows Removed by Filter: 1,519
  • Buffers: shared read=19
  • I/O Timings: read=2.193
Planning time : 15.948 ms
Execution time : 14,789.312 ms