explain.depesz.com

A tool for finding a real cause for slow queries.

Result: exg

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.003 26.959 ↓ 0.0 0 1

Unique (cost=1,746.16..1,746.17 rows=1 width=1,560) (actual time=26.959..26.959 rows=0 loops=1)

2. 0.010 26.956 ↓ 0.0 0 1

Sort (cost=1,746.16..1,746.17 rows=1 width=1,560) (actual time=26.956..26.956 rows=0 loops=1)

  • Sort Key: r.id
  • Sort Method: quicksort Memory: 17kB
3. 0.003 26.946 ↓ 0.0 0 1

Nested Loop (cost=418.07..1,746.15 rows=1 width=1,560) (actual time=26.946..26.946 rows=0 loops=1)

  • Join Filter: (r.userstatus = rus.id)
4. 0.001 26.943 ↓ 0.0 0 1

Nested Loop (cost=418.07..1,695.36 rows=1 width=1,564) (actual time=26.943..26.943 rows=0 loops=1)

5. 0.002 26.942 ↓ 0.0 0 1

Nested Loop (cost=418.07..1,693.38 rows=1 width=1,478) (actual time=26.942..26.942 rows=0 loops=1)

6. 0.002 26.940 ↓ 0.0 0 1

Nested Loop (cost=418.07..1,693.10 rows=1 width=1,208) (actual time=26.940..26.940 rows=0 loops=1)

  • Join Filter: (p.person = kins.padre)
7. 0.002 26.938 ↓ 0.0 0 1

Nested Loop Left Join (cost=418.07..1,692.71 rows=1 width=1,212) (actual time=26.938..26.938 rows=0 loops=1)

8. 0.003 26.936 ↓ 0.0 0 1

Nested Loop Left Join (cost=418.07..1,692.35 rows=1 width=1,204) (actual time=26.936..26.936 rows=0 loops=1)

9. 0.002 26.933 ↓ 0.0 0 1

Nested Loop (cost=418.07..1,692.04 rows=1 width=1,204) (actual time=26.933..26.933 rows=0 loops=1)

  • Join Filter: (r.status = rs.id)
10. 0.012 26.931 ↓ 0.0 0 1

Hash Join (cost=418.07..1,690.88 rows=1 width=660) (actual time=26.931..26.931 rows=0 loops=1)

  • Hash Cond: (p.request = r.id)
11. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=387.50..1,653.48 rows=1,819 width=634) (actual time=.. rows= loops=0)

  • Hash Cond: (kr.microdistrict = md.id)
12. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=371.87..1,631.02 rows=1,819 width=360) (actual time=.. rows= loops=0)

  • Hash Cond: (kr.healthgroup = hg.id)
13. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=370.74..1,623.00 rows=1,819 width=90) (actual time=.. rows= loops=0)

14. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=370.74..576.76 rows=1,819 width=44) (actual time=.. rows= loops=0)

  • Hash Cond: (kr.id = p.request)
15. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=135.88..315.51 rows=2,188 width=28) (actual time=.. rows= loops=0)

  • Hash Cond: (child.request = kr.id)
16. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=60.66..201.95 rows=2,633 width=12) (actual time=.. rows= loops=0)

17. 0.000 0.000 ↓ 0.0 0

Seq Scan on participanttypes childt (cost=0.00..1.05 rows=1 width=4) (actual time=.. rows= loops=0)

  • Filter: ((sysname)::text = 'child'::text)
18. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on participants child (cost=60.66..167.99 rows=2,633 width=16) (actual time=.. rows= loops=0)

  • Recheck Cond: (child.type = childt.id)
19. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on participants_type_idx (cost=0.00..60.00 rows=2,633 width=0) (actual time=.. rows= loops=0)

  • Index Cond: (child.type = childt.id)
20. 0.000 0.000 ↓ 0.0 0

Hash (cost=42.32..42.32 rows=2,632 width=16) (actual time=.. rows= loops=0)

21. 0.000 0.000 ↓ 0.0 0

Seq Scan on kindergartenrequests kr (cost=0.00..42.32 rows=2,632 width=16) (actual time=.. rows= loops=0)

22. 0.000 0.000 ↓ 0.0 0

Hash (cost=201.95..201.95 rows=2,633 width=16) (actual time=.. rows= loops=0)

23. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=60.66..201.95 rows=2,633 width=16) (actual time=.. rows= loops=0)

24. 0.000 0.000 ↓ 0.0 0

Seq Scan on participanttypes pt (cost=0.00..1.05 rows=1 width=4) (actual time=.. rows= loops=0)

  • Filter: ((sysname)::text = 'applicant'::text)
25. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on participants p (cost=60.66..167.99 rows=2,633 width=20) (actual time=.. rows= loops=0)

  • Recheck Cond: (p.type = pt.id)
26. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on participants_type_idx (cost=0.00..60.00 rows=2,633 width=0) (actual time=.. rows= loops=0)

  • Index Cond: (p.type = pt.id)
27. 0.000 0.000 ↓ 0.0 0

Index Scan using initials_pkey on initials i (cost=0.00..0.56 rows=1 width=54) (actual time=.. rows= loops=0)

  • Index Cond: (i.id = p.initial)
28. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.06..1.06 rows=6 width=278) (actual time=.. rows= loops=0)

29. 0.000 0.000 ↓ 0.0 0

Seq Scan on healthgroups hg (cost=0.00..1.06 rows=6 width=278) (actual time=.. rows= loops=0)

30. 0.000 0.000 ↓ 0.0 0

Hash (cost=12.50..12.50 rows=250 width=278) (actual time=.. rows= loops=0)

31. 0.000 0.000 ↓ 0.0 0

Seq Scan on microdistricts md (cost=0.00..12.50 rows=250 width=278) (actual time=.. rows= loops=0)

32. 0.003 26.919 ↓ 0.0 0 1

Hash (cost=30.54..30.54 rows=2 width=34) (actual time=26.919..26.919 rows=0 loops=1)

33. 0.007 26.916 ↓ 0.0 0 1

Bitmap Heap Scan on requests r (cost=15.08..30.54 rows=2 width=34) (actual time=26.916..26.916 rows=0 loops=1)

  • Recheck Cond: (workarea = 3184)
  • Filter: (NOT (hashed SubPlan 5))
34. 26.909 26.909 ↓ 0.0 0 1

Bitmap Index Scan on requests_workarea_idx (cost=0.00..4.29 rows=5 width=0) (actual time=26.909..26.909 rows=0 loops=1)

  • Index Cond: (workarea = 3184)
35.          

SubPlan (forBitmap Heap Scan)

36. 0.000 0.000 ↓ 0.0 0

Seq Scan on aspectinactive (cost=0.00..9.23 rows=623 width=4) (actual time=.. rows= loops=0)

37. 0.000 0.000 ↓ 0.0 0

Seq Scan on requeststatuses rs (cost=0.00..1.09 rows=6 width=552) (actual time=.. rows= loops=0)

  • Filter: ((rs.sysname)::text <> 'rejected'::text)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using document2participant_participant_idx on document2participant d2p (cost=0.00..0.30 rows=1 width=8) (actual time=.. rows= loops=0)

  • Index Cond: (d2p.participant = p.id)
39. 0.000 0.000 ↓ 0.0 0

Index Scan using documents_pkey on documents d (cost=0.00..0.35 rows=1 width=16) (actual time=.. rows= loops=0)

  • Index Cond: (d2p.document = d.id)
40. 0.000 0.000 ↓ 0.0 0

Index Scan using kins_child_idx on kins (cost=0.00..0.37 rows=1 width=12) (actual time=.. rows= loops=0)

  • Index Cond: (kins.child = child.person)
41. 0.000 0.000 ↓ 0.0 0

Index Scan using kintypes_pkey on kintypes (cost=0.00..0.27 rows=1 width=278) (actual time=.. rows= loops=0)

  • Index Cond: (kintypes.id = kins.type)
42. 0.000 0.000 ↓ 0.0 0

Index Scan using initials_pkey on initials ichild (cost=0.00..1.97 rows=1 width=94) (actual time=.. rows= loops=0)

  • Index Cond: (ichild.id = child.initial)
43. 0.000 0.000 ↓ 0.0 0

Seq Scan on requestuserstatuses rus (cost=0.00..1.02 rows=1 width=4) (actual time=.. rows= loops=0)

  • Filter: ((rus.sysname)::text <> 'rejected'::text)
44.          

SubPlan (forNested Loop)

45. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=8.28..10.70 rows=1 width=274) (actual time=.. rows= loops=0)

  • Hash Cond: (b.id = b2kr.bonus)
46. 0.000 0.000 ↓ 0.0 0

Seq Scan on bonuses b (cost=0.00..2.30 rows=30 width=278) (actual time=.. rows= loops=0)

47. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.27..8.27 rows=1 width=4) (actual time=.. rows= loops=0)

48. 0.000 0.000 ↓ 0.0 0

Index Scan using bonus2kindergartenrequest_kindergartenrequest_idx on bonus2kindergartenrequest b2kr (cost=0.00..8.27 rows=1 width=4) (actual time=.. rows= loops=0)

  • Index Cond: (kindergartenrequest = $0)
49. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..16.55 rows=1 width=27) (actual time=.. rows= loops=0)

50. 0.000 0.000 ↓ 0.0 0

Index Scan using preferkindergartens_kindergartenrequest_idx on preferkindergartens pkg (cost=0.00..8.27 rows=1 width=4) (actual time=.. rows= loops=0)

  • Index Cond: (kindergartenrequest = $0)
51. 0.000 0.000 ↓ 0.0 0

Index Scan using workareas_pkey on workareas w (cost=0.00..8.27 rows=1 width=31) (actual time=.. rows= loops=0)

  • Index Cond: (w.id = pkg.kindergarten)
52. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..16.55 rows=1 width=4) (actual time=.. rows= loops=0)

53. 0.000 0.000 ↓ 0.0 0

Index Scan using preferkindergartens_kindergartenrequest_idx on preferkindergartens pkg (cost=0.00..8.27 rows=1 width=4) (actual time=.. rows= loops=0)

  • Index Cond: (kindergartenrequest = $0)
54. 0.000 0.000 ↓ 0.0 0

Index Scan using workareas_pkey on workareas w (cost=0.00..8.27 rows=1 width=4) (actual time=.. rows= loops=0)

  • Index Cond: (w.id = pkg.kindergarten)
55. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=5.91..5.92 rows=1 width=4) (actual time=.. rows= loops=0)

56. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.04..5.91 rows=1 width=4) (actual time=.. rows= loops=0)

  • Join Filter: (b.id = b2kr.bonus)
57. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.04..3.48 rows=2 width=8) (actual time=.. rows= loops=0)

  • Hash Cond: (b.type = bt.id)
58. 0.000 0.000 ↓ 0.0 0

Seq Scan on bonuses b (cost=0.00..2.30 rows=30 width=8) (actual time=.. rows= loops=0)

59. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.02..1.02 rows=2 width=8) (actual time=.. rows= loops=0)

60. 0.000 0.000 ↓ 0.0 0

Seq Scan on bonustypes bt (cost=0.00..1.02 rows=2 width=8) (actual time=.. rows= loops=0)

61. 0.000 0.000 ↓ 0.0 0

Index Scan using bonus2kindergartenrequest_kindergartenrequest_idx on bonus2kindergartenrequest b2kr (cost=0.00..1.20 rows=1 width=4) (actual time=.. rows= loops=0)

  • Index Cond: (b2kr.kindergartenrequest = $0)