explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mw1d

Settings
# exclusive inclusive rows x rows loops node
1. 1.951 61,453.112 ↑ 1.0 1 1

Aggregate (cost=6,518.44..6,518.45 rows=1 width=8) (actual time=61,453.112..61,453.112 rows=1 loops=1)

  • Output: count(*)
  • Buffers: shared hit=4,717,515 dirtied=1
  • model_inspection.gis_cancel_reason_id, model_inspection.gis_cancel_date, model_inspection.gis_cancel_resolution_number, model_inspection.gis_cancel_add_info, model_inspection.gis_should_be_registered, model_inspection.gis_registry_number, model_inspection.description, model_inspection.a_read, model_inspection.a_extended, model_inspection.gis_examination_guid, model_inspection.gis_cancel_files_guids, model_inspection.fillpercent, model_inspection.gis_citizen_firstname, model_inspection.gis_citizen_middlename, model_inspection.gis_citizen_lastname, model_inspection.taskorder_template_p10, model_inspection.external_appeal_person_name,
  • model_inspection.external_appeal_person_address, model_inspection.disclosure_site, model_inspection.direct_detection, model_inspection.gis_unscheduled_type_id,
  • model_inspection.company_type, model_inspection.other_examination_form, model_inspection.destinations_other, model_inspection.is_deleted, model_inspection.gis_export_date, model_inspection.is_complex
  • Execution time: 61,453.485 ms(35 строк)
2. 0.000 61,451.161 ↓ 7,961.0 7,961 1

Nested Loop Semi Join (cost=1,000.29..6,518.44 rows=1 width=0) (actual time=2.033..61,451.161 rows=7,961 loops=1)

  • Buffers: shared hit=4,717,515 dirtied=1
3. 6.483 48.685 ↓ 33,556.0 33,556 1

Gather (cost=1,000.00..5,835.30 rows=1 width=16) (actual time=0.810..48.685 rows=33,556 loops=1)

  • Output: t.guid
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=3,975
4. 42.202 42.202 ↓ 11,185.0 11,185 3 / 3

Parallel Seq Scan on public.model_inspection t (cost=0.00..4,835.20 rows=1 width=16) (actual time=0.016..42.202 rows=11,185 loops=3)

  • Output: t.guid
  • Filter: ((NOT COALESCE(t.is_deleted, false)) AND (((current_setting('public.journals_department_id'::text))::integer = 0) OR (t.department_id = (current_setting('public.journals_department_id'::text))::integer)) AND (((current_setting('public.journals_area_id'::text))::integer = 0) OR (((current_setting('public.journals_area_id'::text))::integer = 29,660) AND (t.area_id IS NULL)) OR (t.area_id = (current_setting('public.journals_area_id'::text))::integer)))
  • Rows Removed by Filter: 284
  • Buffers: shared hit=3,975
  • Worker 0: actual time=0.009..1.294 rows=1,374 loops=1
  • Buffers: shared hit=147
  • Worker 1: actual time=0.008..125.249 rows=32,168 loops=1
  • Buffers: shared hit=3,827
5. 10,805.032 61,407.480 ↓ 0.0 0 33,556

Nested Loop Semi Join (cost=0.29..683.13 rows=1 width=16) (actual time=1.830..1.830 rows=0 loops=33,556)

  • Output: model_inspection.guid
  • Join Filter: (model_inspection.id = inspections_destinations.inspection_id)
  • Rows Removed by Join Filter: 7,173
  • Buffers: shared hit=4,713,540 dirtied=1
6. 100.668 100.668 ↑ 1.0 1 33,556

Index Scan using model_inspection_guid_idx on public.model_inspection (cost=0.29..2.51 rows=1 width=20) (actual time=0.003..0.003 rows=1 loops=33,556)

  • Output: model_inspection.id, model_inspection.guid, model_inspection.number, model_inspection.date, model_inspection.status_id, model_inspection.status_timestamp, model_inspection.priority, model_inspection.type, model_inspection.gis_examination_form_id, model_inspection.department_id, model_inspection.area_id, model_inspection.subject_id, model_inspection.subject_is_owner, model_inspection.author_id, model_inspection.inspector_id, model_inspection.signer_id, model_inspection.gis_base_id, model_inspection.gis_kind_id, model_inspection.regional_oversight, model_inspection.external_appeal_number, model_inspection.address_jur, model_inspection.address_fact, model_inspection.date_create, model_inspection.date_start, model_inspection.date_end, model_inspection.tasks, model_inspection.experts, model_inspection.for_all_buildings, model_inspection.__old_monitoring, model_inspection.gis_cooperation_with, model_inspection.gis_prosecutor_agreement_information, model_inspection.gis_inspection_inability_reason, model_inspection.gis_notification_required, model_inspection.gis_notification_method,
  • Index Cond: (model_inspection.guid = t.guid)
  • Buffers: shared hit=100,998 dirtied=1
7. 50,501.780 50,501.780 ↑ 1.1 7,174 33,556

Seq Scan on public.inspections_destinations (cost=0.00..579.00 rows=8,130 width=4) (actual time=0.005..1.505 rows=7,174 loops=33,556)

  • Output: inspections_destinations.inspection_id, inspections_destinations.destination_id
  • Filter: (inspections_destinations.destination_id = 30,615)
  • Rows Removed by Filter: 23,718
  • Buffers: shared hit=4,612,542
Planning time : 2.845 ms