explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mvRY

Settings
# exclusive inclusive rows x rows loops node
1. 134.128 1,954.188 ↓ 6.9 15,275 1

Nested Loop Left Join (cost=8.82..78,675.11 rows=2,216 width=777) (actual time=0.396..1,954.188 rows=15,275 loops=1)

  • Output: d.id, d.parent_id, d.del_rec, CASE dbot.typeof WHEN 'Integro.Objects.Modules.Docflow.DocflowObjects.IncomingDocument'::text THEN 2 WHEN 'Integro.Objects.Modules.Docflow.DocflowObjects.OutgoingDocument'::text THEN 3 WHEN 'Integro.Objects.Modules.D (...)
  • Buffers: shared hit=423398 read=38087
2. 30.286 1,117.410 ↓ 6.9 15,275 1

Nested Loop Left Join (cost=8.26..46,461.11 rows=2,216 width=748) (actual time=0.330..1,117.410 rows=15,275 loops=1)

  • Output: d.id, d.parent_id, d.del_rec, d.is_duplicate, d.created_by, c.reg_number, c.reg_date, c.recipients_employee, c.recipients_enterprise, dbot.typeof, read.business_object_id, fav.business_object_id, pc.property_value, pis.property_value, psn.p (...)
  • Buffers: shared hit=304321 read=11597
3. 38.651 995.474 ↓ 6.9 15,275 1

Nested Loop Left Join (cost=7.70..31,979.53 rows=2,216 width=735) (actual time=0.320..995.474 rows=15,275 loops=1)

  • Output: d.id, d.parent_id, d.del_rec, d.is_duplicate, d.created_by, c.reg_number, c.reg_date, c.recipients_employee, c.recipients_enterprise, c.id, dbot.typeof, read.business_object_id, fav.business_object_id, pc.property_value, pis.property_ (...)
  • Buffers: shared hit=243426 read=11298
4. 44.604 819.348 ↓ 6.9 15,275 1

Nested Loop Left Join (cost=7.14..17,497.94 rows=2,216 width=706) (actual time=0.307..819.348 rows=15,275 loops=1)

  • Output: d.id, d.parent_id, d.del_rec, d.is_duplicate, d.created_by, c.reg_number, c.reg_date, c.recipients_employee, c.recipients_enterprise, c.id, dbot.typeof, read.business_object_id, fav.business_object_id, pc.property_value
  • Buffers: shared hit=176018 read=10193
5. 29.019 438.694 ↓ 6.9 15,275 1

Hash Join (cost=6.59..3,016.36 rows=2,216 width=677) (actual time=0.243..438.694 rows=15,275 loops=1)

  • Output: d.id, d.parent_id, d.del_rec, d.is_duplicate, d.created_by, c.reg_number, c.reg_date, c.recipients_employee, c.recipients_enterprise, c.id, dbot.typeof, read.business_object_id, fav.business_object_id
  • Hash Cond: (c.bo_type = cbot.id)
  • Buffers: shared hit=113294 read=4
6. 52.252 409.608 ↓ 6.9 15,275 1

Nested Loop (cost=4.80..2,984.10 rows=2,216 width=679) (actual time=0.166..409.608 rows=15,275 loops=1)

  • Output: d.id, d.parent_id, d.del_rec, d.is_duplicate, d.created_by, c.reg_number, c.reg_date, c.recipients_employee, c.recipients_enterprise, c.bo_type, c.id, dbot.typeof, read.business_object_id, fav.business_object_id
  • Buffers: shared hit=113293 read=4
7. 31.432 244.976 ↓ 8.7 18,730 1

Hash Left Join (cost=4.51..2,095.39 rows=2,146 width=598) (actual time=0.152..244.976 rows=18,730 loops=1)

  • Output: d.id, d.parent_id, d.del_rec, d.is_duplicate, d.created_by, dbot.typeof, read.business_object_id, fav.business_object_id
  • Hash Cond: (d.id = fav.business_object_id)
  • Buffers: shared hit=56963 read=4
8. 54.293 213.456 ↓ 8.7 18,730 1

Nested Loop Left Join (cost=1.94..2,082.05 rows=2,146 width=582) (actual time=0.057..213.456 rows=18,730 loops=1)

  • Output: d.id, d.parent_id, d.del_rec, d.is_duplicate, d.created_by, dbot.typeof, read.business_object_id
  • Buffers: shared hit=56962 read=4
9. 37.366 65.513 ↓ 8.7 18,730 1

Hash Join (cost=1.52..796.27 rows=2,146 width=566) (actual time=0.038..65.513 rows=18,730 loops=1)

  • Output: d.id, d.parent_id, d.del_rec, d.is_duplicate, d.created_by, dbot.typeof
  • Hash Cond: (d.bo_type = dbot.id)
  • Buffers: shared hit=425 read=2
10. 28.126 28.126 ↑ 1.0 24,729 1

Seq Scan on public.t_document d (cost=0.00..679.42 rows=25,031 width=52) (actual time=0.007..28.126 rows=24,729 loops=1)

  • Output: d.id, d.parent_id, d.bo_type, d.rec_date, d.del_rec, d.is_rejected, d.created_by, d.creation_time, d.enterprise_id, d.is_private, d.folder_id, d.sender_id, d.is_duplicate
  • Filter: ((NOT d.is_duplicate) OR d.del_rec)
  • Rows Removed by Filter: 305
  • Buffers: shared hit=424 read=2
11. 0.004 0.021 ↑ 1.0 3 1

Hash (cost=1.48..1.48 rows=3 width=518) (actual time=0.021..0.021 rows=3 loops=1)

  • Output: dbot.typeof, dbot.id
  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • Buffers: shared hit=1
12. 0.017 0.017 ↑ 1.0 3 1

Seq Scan on public.t_business_object_types dbot (cost=0.00..1.48 rows=3 width=518) (actual time=0.006..0.017 rows=3 loops=1)

  • Output: dbot.typeof, dbot.id
  • Filter: ((dbot.typeof)::text = ANY ('{Integro.Objects.Modules.Docflow.DocflowObjects.IncomingDocument,Integro.Objects.Modules.Docflow.DocflowObjects.OutgoingDocument,Integro.Objects.Modules.Docf (...)
  • Rows Removed by Filter: 32
  • Buffers: shared hit=1
13. 93.650 93.650 ↓ 0.0 0 18,730

Index Only Scan using l_readers_pkey on public.l_readers read (cost=0.42..0.59 rows=1 width=16) (actual time=0.005..0.005 rows=0 loops=18,730)

  • Output: read.business_object_id, read.employee_id
  • Index Cond: ((read.business_object_id = d.id) AND (read.employee_id = 'a5098b77-8081-42d4-b912-10a83e086747'::uuid))
  • Heap Fetches: 234
  • Buffers: shared hit=56537 read=2
14. 0.039 0.088 ↓ 1.0 45 1

Hash (cost=2.03..2.03 rows=44 width=16) (actual time=0.088..0.088 rows=45 loops=1)

  • Output: fav.business_object_id
  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
  • Buffers: shared hit=1
15. 0.049 0.049 ↓ 1.0 45 1

Seq Scan on public.l_favorites fav (cost=0.00..2.03 rows=44 width=16) (actual time=0.008..0.049 rows=45 loops=1)

  • Output: fav.business_object_id
  • Filter: (fav.employee_id = 'a5098b77-8081-42d4-b912-10a83e086747'::uuid)
  • Rows Removed by Filter: 43
  • Buffers: shared hit=1
16. 112.380 112.380 ↑ 1.0 1 18,730

Index Scan using t_card_parent_id_idx on public.t_card c (cost=0.29..0.40 rows=1 width=97) (actual time=0.005..0.006 rows=1 loops=18,730)

  • Output: c.id, c.parent_id, c.bo_type, c.rec_date, c.del_rec, c.reg_number, c.reg_date, c.recipients_employee, c.recipients_enterprise
  • Index Cond: (c.parent_id = d.id)
  • Filter: ((NOT c.del_rec) AND ((c.reg_number)::text <> ''::text))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=56330
17. 0.032 0.067 ↑ 1.0 35 1

Hash (cost=1.35..1.35 rows=35 width=2) (actual time=0.067..0.067 rows=35 loops=1)

  • Output: cbot.id
  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
  • Buffers: shared hit=1
18. 0.035 0.035 ↑ 1.0 35 1

Seq Scan on public.t_business_object_types cbot (cost=0.00..1.35 rows=35 width=2) (actual time=0.008..0.035 rows=35 loops=1)

  • Output: cbot.id
  • Buffers: shared hit=1
19. 336.050 336.050 ↑ 1.0 1 15,275

Index Scan using t_properties_business_object_id_property_idx on public.t_properties pc (cost=0.56..6.53 rows=1 width=45) (actual time=0.021..0.022 rows=1 loops=15,275)

  • Output: pc.business_object_id, pc.property, pc.property_value
  • Index Cond: ((pc.business_object_id = c.id) AND ((pc.property)::text = 'Correspondent'::text))
  • Buffers: shared hit=62724 read=10189
20. 137.475 137.475 ↓ 0.0 0 15,275

Index Scan using t_properties_business_object_id_property_idx on public.t_properties pis (cost=0.56..6.53 rows=1 width=45) (actual time=0.008..0.009 rows=0 loops=15,275)

  • Output: pis.business_object_id, pis.property, pis.property_value
  • Index Cond: ((pis.business_object_id = c.id) AND ((pis.property)::text = 'IsSection'::text))
  • Buffers: shared hit=67408 read=1105
21. 91.650 91.650 ↓ 0.0 0 15,275

Index Scan using t_properties_business_object_id_property_idx on public.t_properties psn (cost=0.56..6.53 rows=1 width=45) (actual time=0.006..0.006 rows=0 loops=15,275)

  • Output: psn.business_object_id, psn.property, psn.property_value
  • Index Cond: ((psn.business_object_id = c.id) AND ((psn.property)::text = 'SectionNumber'::text))
  • Buffers: shared hit=60895 read=299
22. 336.050 336.050 ↑ 1.0 1 15,275

Index Scan using t_properties_business_object_id_property_idx on public.t_properties pt (cost=0.56..6.59 rows=1 width=45) (actual time=0.021..0.022 rows=1 loops=15,275)

  • Output: pt.business_object_id, pt.property, pt.property_value
  • Index Cond: ((pt.business_object_id = d.id) AND ((pt.property)::text = 'Theme'::text))
  • Buffers: shared hit=64244 read=12289
23.          

SubPlan (forNested Loop Left Join)

24. 366.600 366.600 ↑ 7.0 1 15,275

Index Scan using t_docflow_businessobjects_parent_id_idx on public.t_docflow_businessobjects (cost=0.42..52.75 rows=7 width=0) (actual time=0.024..0.024 rows=1 loops=15,275)

  • Index Cond: (t_docflow_businessobjects.parent_id = d.id)
  • Filter: ((NOT t_docflow_businessobjects.del_rec) AND (t_docflow_businessobjects.business_object_type <> ALL ('{2,101,102,103,400,1000,1100,5002}'::integer[])))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=54833 read=14201
25. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.t_docflow_businessobjects t_docflow_businessobjects_1 (cost=0.00..79,018.98 rows=369,780 width=16) (never executed)

  • Output: t_docflow_businessobjects_1.parent_id
  • Filter: ((NOT t_docflow_businessobjects_1.del_rec) AND (t_docflow_businessobjects_1.business_object_type <> ALL ('{2,101,102,103,400,1000,1100,5002}'::integer[])))