explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2oZh

Settings
# exclusive inclusive rows x rows loops node
1. 15.341 2,643.087 ↑ 1.0 1 1

Aggregate (cost=3,222.49..3,222.50 rows=1 width=8) (actual time=2,643.086..2,643.087 rows=1 loops=1)

2.          

Initplan (for Aggregate)

3. 0.056 0.056 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.055..0.056 rows=1 loops=1)

4. 53.520 2,627.690 ↓ 9,807.0 19,614 1

Nested Loop (cost=86.78..3,222.47 rows=2 width=0) (actual time=2.270..2,627.690 rows=19,614 loops=1)

5. 47.068 2,515.328 ↓ 9,807.0 19,614 1

Nested Loop Left Join (cost=86.51..3,218.26 rows=2 width=16) (actual time=2.256..2,515.328 rows=19,614 loops=1)

6. 33.512 565.702 ↓ 9,807.0 19,614 1

Nested Loop Semi Join (cost=84.54..3,200.98 rows=2 width=24) (actual time=2.056..565.702 rows=19,614 loops=1)

7. 32.630 512.576 ↓ 9,807.0 19,614 1

Hash Join (cost=59.05..3,124.73 rows=2 width=32) (actual time=1.048..512.576 rows=19,614 loops=1)

  • Hash Cond: (request.org_add = lp_p.id)
8. 61.242 479.448 ↓ 94.3 19,799 1

Nested Loop Left Join (cost=1.91..3,067.05 rows=210 width=24) (actual time=0.492..479.448 rows=19,799 loops=1)

9. 29.106 61.824 ↓ 94.3 19,799 1

Nested Loop (cost=1.07..676.84 rows=210 width=32) (actual time=0.457..61.824 rows=19,799 loops=1)

10. 0.232 0.232 ↑ 1.0 1 1

Index Scan using fdc_request_type_pk on fdc_request_type c (cost=0.39..8.41 rows=1 width=12) (actual time=0.231..0.232 rows=1 loops=1)

  • Index Cond: (id = nsi.c_request_type_101_id())
11. 32.486 32.486 ↓ 94.3 19,799 1

Index Scan using fdc_request_rtype_i on fdc_request request (cost=0.68..666.33 rows=210 width=40) (actual time=0.022..32.486 rows=19,799 loops=1)

  • Index Cond: (request_type_id = nsi.c_request_type_101_id())
12. 59.397 356.382 ↑ 2.0 1 19,799

Nested Loop (cost=0.83..11.36 rows=2 width=8) (actual time=0.014..0.018 rows=1 loops=19,799)

13. 79.196 237.588 ↑ 2.0 1 19,799

Nested Loop Left Join (cost=0.70..11.05 rows=2 width=16) (actual time=0.009..0.012 rows=1 loops=19,799)

14. 118.794 118.794 ↑ 2.0 1 19,799

Index Scan using fdc_request_status_history_request_i on fdc_request_status_history rsh (cost=0.43..8.85 rows=2 width=24) (actual time=0.004..0.006 rows=1 loops=19,799)

  • Index Cond: (request_id = request.id)
  • Filter: ((statement_timestamp() >= date_from) AND (statement_timestamp() <= date_to))
  • Rows Removed by Filter: 1
15. 19.799 39.598 ↓ 0.0 0 19,799

Nested Loop (cost=0.27..1.09 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=19,799)

16. 19.799 19.799 ↓ 0.0 0 19,799

Index Scan using fdc_change_status_reason_pk on fdc_change_status_reason c_2 (cost=0.14..0.16 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=19,799)

  • Index Cond: (id = rsh.reason_id)
17. 0.000 0.000 ↓ 0.0 0

Index Only Scan using fdc_object_type_pk on fdc_object_type c_3 (cost=0.13..0.67 rows=1 width=8) (never executed)

  • Index Cond: (id = c_2.object_type_id)
  • Heap Fetches: 0
18. 59.397 59.397 ↑ 1.0 1 19,799

Index Only Scan using fdc_request_status_pk on fdc_request_status c_1 (cost=0.14..0.15 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=19,799)

  • Index Cond: (id = rsh.status_id)
  • Heap Fetches: 19,799
19. 0.026 0.498 ↑ 1.0 20 1

Hash (cost=56.89..56.89 rows=20 width=8) (actual time=0.498..0.498 rows=20 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
20. 0.472 0.472 ↑ 1.0 20 1

Seq Scan on fdc_person lp_p (cost=0.00..56.89 rows=20 width=8) (actual time=0.026..0.472 rows=20 loops=1)

  • Filter: (person_root_id = 15,126)
  • Rows Removed by Filter: 2,705
21. 18.614 19.614 ↑ 4.0 1 19,614

Materialize (cost=25.50..76.21 rows=4 width=8) (actual time=0.001..0.001 rows=1 loops=19,614)

22. 0.085 1.000 ↑ 4.0 1 1

Hash Join (cost=25.50..76.19 rows=4 width=8) (actual time=1.000..1.000 rows=1 loops=1)

  • Hash Cond: (gra.group_id = grm.group_id)
23. 0.089 0.830 ↑ 5.3 49 1

Nested Loop (cost=8.77..56.15 rows=262 width=16) (actual time=0.614..0.830 rows=49 loops=1)

24. 0.003 0.594 ↑ 6.0 1 1

Nested Loop (cost=8.49..32.64 rows=6 width=24) (actual time=0.594..0.594 rows=1 loops=1)

25. 0.216 0.216 ↑ 1.0 1 1

Index Only Scan using fdc_request_type_pk on fdc_request_type c_4 (cost=0.39..8.41 rows=1 width=8) (actual time=0.216..0.216 rows=1 loops=1)

  • Index Cond: (id = nsi.c_request_type_101_id())
  • Heap Fetches: 1
26. 0.072 0.375 ↑ 6.0 1 1

Hash Join (cost=8.09..24.17 rows=6 width=24) (actual time=0.374..0.375 rows=1 loops=1)

  • Hash Cond: (c_5.id = rta.authority_id)
27. 0.077 0.077 ↑ 10.3 69 1

Seq Scan on fdc_authority c_5 (cost=0.00..14.20 rows=711 width=16) (actual time=0.012..0.077 rows=69 loops=1)

  • Filter: (NOT is_archived)
28. 0.006 0.226 ↑ 3.0 2 1

Hash (cost=8.02..8.02 rows=6 width=16) (actual time=0.226..0.226 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
29. 0.010 0.220 ↑ 3.0 2 1

Bitmap Heap Scan on fdc_request_type_authority rta (cost=4.44..8.02 rows=6 width=16) (actual time=0.218..0.220 rows=2 loops=1)

  • Recheck Cond: (request_type_id = nsi.c_request_type_101_id())
  • Heap Blocks: exact=1
30. 0.210 0.210 ↑ 3.0 2 1

Bitmap Index Scan on fdc_request_authority_uk (cost=0.00..4.44 rows=6 width=0) (actual time=0.210..0.210 rows=2 loops=1)

  • Index Cond: (request_type_id = nsi.c_request_type_101_id())
31. 0.147 0.147 ↑ 1.0 49 1

Index Scan using fdc_group_authority_a_i on fdc_group_authority gra (cost=0.29..3.41 rows=51 width=16) (actual time=0.016..0.147 rows=49 loops=1)

  • Index Cond: (authority_id = c_5.id)
32. 0.006 0.085 ↑ 4.0 2 1

Hash (cost=16.62..16.62 rows=8 width=8) (actual time=0.085..0.085 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
33. 0.079 0.079 ↑ 4.0 2 1

Index Scan using fdc_group_member_u_i on fdc_group_member grm (cost=0.28..16.62 rows=8 width=8) (actual time=0.074..0.079 rows=2 loops=1)

  • Index Cond: (user_id = $0)
34. 80.565 1,902.558 ↑ 10.0 1 19,614

Nested Loop Left Join (cost=1.96..8.54 rows=10 width=8) (actual time=0.081..0.097 rows=1 loops=19,614)

35. 78.826 706.104 ↑ 1.0 1 19,614

Nested Loop Left Join (cost=0.56..3.45 rows=1 width=16) (actual time=0.031..0.036 rows=1 loops=19,614)

36. 98.514 431.508 ↑ 1.0 1 19,614

Nested Loop Left Join (cost=0.42..2.78 rows=1 width=16) (actual time=0.019..0.022 rows=1 loops=19,614)

37. 98.070 98.070 ↑ 1.0 1 19,614

Index Scan using fdc_user_pk on fdc_user u (cost=0.27..2.42 rows=1 width=32) (actual time=0.004..0.005 rows=1 loops=19,614)

  • Index Cond: (id = request.user_add)
38. 234.924 234.924 ↑ 1.0 1 19,577

Index Scan using fdc_user_password_user_date_uk on fdc_user_password up (cost=0.14..0.35 rows=1 width=8) (actual time=0.012..0.012 rows=1 loops=19,577)

  • Index Cond: (user_id = u.id)
  • Filter: ((statement_timestamp() >= date_from) AND (statement_timestamp() <= date_to))
  • Rows Removed by Filter: 0
39. 195.770 195.770 ↑ 1.0 1 19,577

Index Scan using fdc_person_root_date_uk on fdc_person per (cost=0.14..0.66 rows=1 width=16) (actual time=0.010..0.010 rows=1 loops=19,577)

  • Index Cond: (person_root_id = u.person_root_id)
  • Filter: ((statement_timestamp() >= date_from) AND (statement_timestamp() <= date_to))
40. 78.308 1,115.889 ↑ 65.0 1 19,577

Nested Loop Left Join (cost=1.40..4.44 rows=65 width=8) (actual time=0.048..0.057 rows=1 loops=19,577)

41. 78.308 724.349 ↑ 8.0 1 19,577

Nested Loop Left Join (cost=1.26..2.43 rows=8 width=16) (actual time=0.030..0.037 rows=1 loops=19,577)

42. 58.731 450.271 ↑ 1.0 1 19,577

Nested Loop Left Join (cost=1.11..2.18 rows=1 width=24) (actual time=0.019..0.023 rows=1 loops=19,577)

43. 78.308 332.809 ↑ 1.0 1 19,577

Nested Loop Left Join (cost=0.83..1.56 rows=1 width=24) (actual time=0.014..0.017 rows=1 loops=19,577)

44. 78.308 215.347 ↑ 1.0 1 19,577

Nested Loop (cost=0.55..0.93 rows=1 width=24) (actual time=0.009..0.011 rows=1 loops=19,577)

45. 78.308 78.308 ↑ 1.0 1 19,577

Index Scan using fdc_official_person_pk on fdc_official_person ofp (cost=0.27..0.31 rows=1 width=24) (actual time=0.003..0.004 rows=1 loops=19,577)

  • Index Cond: (id = per.id)
46. 58.731 58.731 ↑ 1.0 1 19,577

Index Only Scan using fdc_person_pk on fdc_person per_1 (cost=0.28..0.62 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=19,577)

  • Index Cond: (id = ofp.id)
  • Heap Fetches: 19,577
47. 39.154 39.154 ↑ 1.0 1 19,577

Index Scan using fdc_person_pk on fdc_person ind_ver (cost=0.28..0.62 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=19,577)

  • Index Cond: (id = ofp.individual_id)
48. 58.731 58.731 ↑ 1.0 1 19,577

Index Scan using fdc_person_pk on fdc_person leg_ver (cost=0.28..0.62 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=19,577)

  • Index Cond: (id = ofp.legal_person_id)
49. 195.770 195.770 ↑ 1.0 1 19,577

Index Scan using fdc_person_root_date_uk on fdc_person ind_per (cost=0.14..0.24 rows=1 width=16) (actual time=0.009..0.010 rows=1 loops=19,577)

  • Index Cond: (person_root_id = ind_ver.person_root_id)
  • Filter: ((statement_timestamp() >= date_from) AND (statement_timestamp() <= date_to))
50. 313.232 313.232 ↑ 1.0 1 19,577

Index Scan using fdc_person_root_date_uk on fdc_person leg_per (cost=0.14..0.24 rows=1 width=16) (actual time=0.015..0.016 rows=1 loops=19,577)

  • Index Cond: (person_root_id = leg_ver.person_root_id)
  • Filter: ((statement_timestamp() >= date_from) AND (statement_timestamp() <= date_to))
  • Rows Removed by Filter: 13
51. 58.842 58.842 ↑ 1.0 1 19,614

Index Only Scan using fdc_legal_person_pk on fdc_legal_person org_list (cost=0.28..2.10 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=19,614)

  • Index Cond: (id = request.org_add)
  • Heap Fetches: 19,614
Planning time : 14.287 ms
Execution time : 2,643.517 ms