explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7ZND

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 15,060.473 49,530.835 ↓ 1.7 418,140 1

Sort (cost=568,558.05..569,185.41 rows=250,947 width=541) (actual time=49,232.566..49,530.835 rows=418,140 loops=1)

  • Sort Key: policyendo2_.pe_issue_date
  • Sort Method: external merge Disk: 199584kB
2. 8,625.680 34,470.362 ↓ 1.7 418,140 1

Hash Join (cost=88,799.68..363,351.84 rows=250,947 width=541) (actual time=6,821.546..34,470.362 rows=418,140 loops=1)

  • Hash Cond: ((policyendo2_.pe_policy_head_oid)::text = (takers15_.pet_policy_head_oid)::text)
3. 460.254 24,330.868 ↓ 1.7 417,983 1

Hash Join (cost=63,269.80..276,704.05 rows=250,790 width=564) (actual time=5,307.652..24,330.868 rows=417,983 loops=1)

  • Hash Cond: ((policyhead10_.wf_status_oid)::text = (wfstatuspo12_.oid)::text)
4. 434.785 23,870.555 ↓ 1.7 417,983 1

Hash Join (cost=63,267.58..273,253.48 rows=250,790 width=538) (actual time=5,307.559..23,870.555 rows=417,983 loops=1)

  • Hash Cond: ((policyendo2_.pe_broker_oid)::text = (producerpo8_.oid)::text)
5. 5,242.263 23,432.537 ↓ 1.7 417,983 1

Hash Join (cost=61,634.23..268,171.76 rows=250,790 width=512) (actual time=5,304.309..23,432.537 rows=417,983 loops=1)

  • Hash Cond: ((policyendo2_.pe_policy_head_oid)::text = (policyhead10_.oid)::text)
6. 399.927 17,109.812 ↑ 1.0 417,983 1

Hash Join (cost=50,264.85..212,565.09 rows=417,983 width=334) (actual time=3,889.447..17,109.812 rows=417,983 loops=1)

  • Hash Cond: ((policypayp0_.wf_status_oid)::text = (wfstatuspo1_.oid)::text)
7. 412.295 16,709.827 ↑ 1.0 417,983 1

Hash Join (cost=50,262.63..206,815.61 rows=417,983 width=306) (actual time=3,889.355..16,709.827 rows=417,983 loops=1)

  • Hash Cond: ((policyendo2_.pe_producer_oid)::text = (producerpo6_.oid)::text)
8. 551.771 16,294.758 ↑ 1.0 417,983 1

Hash Join (cost=48,629.28..199,435.00 rows=417,983 width=280) (actual time=3,886.559..16,294.758 rows=417,983 loops=1)

  • Hash Cond: ((policyendo2_.pe_group_oid)::text = (grouppo3_.oid)::text)
9. 8,377.263 15,661.539 ↑ 1.0 417,983 1

Hash Join (cost=42,102.55..184,548.61 rows=417,983 width=237) (actual time=3,805.077..15,661.539 rows=417,983 loops=1)

  • Hash Cond: ((policypayp0_.ppp_endorsement_oid)::text = (policyendo2_.oid)::text)
10. 3,510.338 3,510.338 ↑ 1.0 417,983 1

Seq Scan on policy_payment_plan policypayp0_ (cost=0.00..108,835.83 rows=417,983 width=125) (actual time=5.442..3,510.338 rows=417,983 loops=1)

11. 3,189.470 3,773.938 ↑ 1.0 442,955 1

Hash (cost=25,230.69..25,230.69 rows=445,269 width=178) (actual time=3,773.938..3,773.938 rows=442,955 loops=1)

  • Buckets: 1024 Batches: 128 Memory Usage: 763kB
12. 584.468 584.468 ↑ 1.0 442,955 1

Seq Scan on policy_endorsement policyendo2_ (cost=0.00..25,230.69 rows=445,269 width=178) (actual time=6.563..584.468 rows=442,955 loops=1)

13. 3.850 81.448 ↑ 1.0 6,250 1

Hash (cost=6,448.60..6,448.60 rows=6,250 width=96) (actual time=81.448..81.448 rows=6,250 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 787kB
14. 28.627 77.598 ↑ 1.0 6,250 1

Hash Join (cost=2,688.53..6,448.60 rows=6,250 width=96) (actual time=32.980..77.598 rows=6,250 loops=1)

  • Hash Cond: ((personpo5_.oid)::text = (entitypo4_.ent_person_oid)::text)
15. 16.033 16.033 ↑ 1.0 75,290 1

Seq Scan on app_person personpo5_ (cost=0.00..3,132.90 rows=75,290 width=72) (actual time=0.004..16.033 rows=75,290 loops=1)

16. 3.413 32.938 ↑ 1.0 6,250 1

Hash (cost=2,610.40..2,610.40 rows=6,250 width=80) (actual time=32.938..32.938 rows=6,250 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 702kB
17. 15.704 29.525 ↑ 1.0 6,250 1

Hash Join (cost=284.62..2,610.40 rows=6,250 width=80) (actual time=6.253..29.525 rows=6,250 loops=1)

  • Hash Cond: ((entitypo4_.oid)::text = (grouppo3_.group_entity_oid)::text)
18. 7.607 7.607 ↑ 1.0 38,808 1

Seq Scan on app_entity entitypo4_ (cost=0.00..1,293.08 rows=38,808 width=61) (actual time=0.005..7.607 rows=38,808 loops=1)

19. 3.363 6.214 ↑ 1.0 6,250 1

Hash (cost=206.50..206.50 rows=6,250 width=70) (actual time=6.214..6.214 rows=6,250 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 633kB
20. 2.851 2.851 ↑ 1.0 6,250 1

Seq Scan on app_group grouppo3_ (cost=0.00..206.50 rows=6,250 width=70) (actual time=0.006..2.851 rows=6,250 loops=1)

21. 0.180 2.774 ↑ 1.0 205 1

Hash (cost=1,630.79..1,630.79 rows=205 width=91) (actual time=2.774..2.774 rows=205 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
22. 0.279 2.594 ↑ 1.0 205 1

Nested Loop (cost=0.42..1,630.79 rows=205 width=91) (actual time=0.044..2.594 rows=205 loops=1)

23. 0.060 0.060 ↑ 1.0 205 1

Seq Scan on app_productor producerpo6_ (cost=0.00..7.05 rows=205 width=80) (actual time=0.005..0.060 rows=205 loops=1)

24. 2.255 2.255 ↑ 1.0 1 205

Index Scan using app_person_pkey on app_person personpo7_ (cost=0.42..7.91 rows=1 width=72) (actual time=0.010..0.011 rows=1 loops=205)

  • Index Cond: ((oid)::text = (producerpo6_.pro_person_oid)::text)
25. 0.034 0.058 ↑ 1.0 54 1

Hash (cost=1.54..1.54 rows=54 width=38) (actual time=0.058..0.058 rows=54 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
26. 0.024 0.024 ↑ 1.0 54 1

Seq Scan on wf_status wfstatuspo1_ (cost=0.00..1.54 rows=54 width=38) (actual time=0.006..0.024 rows=54 loops=1)

27. 772.698 1,080.462 ↓ 1.7 155,900 1

Hash (cost=7,819.65..7,819.65 rows=93,659 width=178) (actual time=1,080.462..1,080.462 rows=155,900 loops=1)

  • Buckets: 1024 Batches: 32 Memory Usage: 911kB
28. 162.820 307.764 ↓ 1.7 155,900 1

Hash Join (cost=18.70..7,819.65 rows=93,659 width=178) (actual time=0.499..307.764 rows=155,900 loops=1)

  • Hash Cond: ((policyhead10_.ph_template_oid)::text = (productpo11_.oid)::text)
29. 144.509 144.509 ↑ 1.0 155,900 1

Seq Scan on policy_head policyhead10_ (cost=0.00..6,278.99 rows=156,099 width=56) (actual time=0.043..144.509 rows=155,900 loops=1)

30. 0.034 0.435 ↑ 1.2 55 1

Hash (cost=17.87..17.87 rows=66 width=133) (actual time=0.435..0.435 rows=55 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
31. 0.070 0.401 ↑ 1.2 55 1

Hash Join (cost=8.79..17.87 rows=66 width=133) (actual time=0.241..0.401 rows=55 loops=1)

  • Hash Cond: ((productpo11_.tplt_product_company_oid)::text = (rtcompanyp14_.oid)::text)
32. 0.125 0.187 ↑ 1.2 55 1

Hash Join (cost=1.68..9.85 rows=66 width=103) (actual time=0.074..0.187 rows=55 loops=1)

  • Hash Cond: ((productpo11_.tplt_product_section_oid)::text = (rtsectionp13_.oid)::text)
33. 0.033 0.033 ↑ 2.0 55 1

Seq Scan on product productpo11_ (cost=0.00..7.10 rows=110 width=72) (actual time=0.013..0.033 rows=55 loops=1)

34. 0.016 0.029 ↑ 1.0 30 1

Hash (cost=1.30..1.30 rows=30 width=120) (actual time=0.029..0.029 rows=30 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
35. 0.013 0.013 ↑ 1.0 30 1

Seq Scan on rot_section rtsectionp13_ (cost=0.00..1.30 rows=30 width=120) (actual time=0.006..0.013 rows=30 loops=1)

36. 0.077 0.144 ↑ 1.0 183 1

Hash (cost=4.83..4.83 rows=183 width=58) (actual time=0.144..0.144 rows=183 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
37. 0.067 0.067 ↑ 1.0 183 1

Seq Scan on rot_company rtcompanyp14_ (cost=0.00..4.83 rows=183 width=58) (actual time=0.007..0.067 rows=183 loops=1)

38. 0.222 3.233 ↑ 1.0 205 1

Hash (cost=1,630.79..1,630.79 rows=205 width=91) (actual time=3.233..3.233 rows=205 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
39. 0.277 3.011 ↑ 1.0 205 1

Nested Loop (cost=0.42..1,630.79 rows=205 width=91) (actual time=0.049..3.011 rows=205 loops=1)

40. 0.069 0.069 ↑ 1.0 205 1

Seq Scan on app_productor producerpo8_ (cost=0.00..7.05 rows=205 width=80) (actual time=0.006..0.069 rows=205 loops=1)

41. 2.665 2.665 ↑ 1.0 1 205

Index Scan using app_person_pkey on app_person personpo9_ (cost=0.42..7.91 rows=1 width=72) (actual time=0.012..0.013 rows=1 loops=205)

  • Index Cond: ((oid)::text = (producerpo8_.pro_person_oid)::text)
42. 0.026 0.059 ↑ 1.0 54 1

Hash (cost=1.54..1.54 rows=54 width=38) (actual time=0.059..0.059 rows=54 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
43. 0.033 0.033 ↑ 1.0 54 1

Seq Scan on wf_status wfstatuspo12_ (cost=0.00..1.54 rows=54 width=38) (actual time=0.014..0.033 rows=54 loops=1)

44. 466.509 1,513.814 ↑ 1.0 155,978 1

Hash (cost=21,599.15..21,599.15 rows=155,978 width=76) (actual time=1,513.814..1,513.814 rows=155,978 loops=1)

  • Buckets: 1024 Batches: 32 Memory Usage: 580kB
45. 499.708 1,047.305 ↑ 1.0 155,978 1

Hash Join (cost=9,752.90..21,599.15 rows=155,978 width=76) (actual time=481.068..1,047.305 rows=155,978 loops=1)

  • Hash Cond: ((takers15_.pet_entity_oid)::text = (entitypo16_.oid)::text)
46. 67.008 67.008 ↑ 1.0 155,978 1

Seq Scan on policy_endorsement_taker takers15_ (cost=0.00..4,334.78 rows=155,978 width=59) (actual time=0.010..67.008 rows=155,978 loops=1)

47. 89.175 480.589 ↑ 1.0 38,808 1

Hash (cost=8,812.80..8,812.80 rows=38,808 width=69) (actual time=480.589..480.589 rows=38,808 loops=1)

  • Buckets: 1024 Batches: 4 Memory Usage: 1016kB
48. 144.285 391.414 ↑ 1.0 38,808 1

Hash Join (cost=4,957.02..8,812.80 rows=38,808 width=69) (actual time=228.722..391.414 rows=38,808 loops=1)

  • Hash Cond: ((entitypo16_.ent_person_oid)::text = (personpo17_.oid)::text)
49. 19.548 19.548 ↑ 1.0 38,808 1

Seq Scan on app_entity entitypo16_ (cost=0.00..1,293.08 rows=38,808 width=53) (actual time=0.006..19.548 rows=38,808 loops=1)

50. 180.705 227.581 ↑ 1.0 75,290 1

Hash (cost=3,132.90..3,132.90 rows=75,290 width=72) (actual time=227.581..227.581 rows=75,290 loops=1)

  • Buckets: 1024 Batches: 8 Memory Usage: 994kB
51. 46.876 46.876 ↑ 1.0 75,290 1

Seq Scan on app_person personpo17_ (cost=0.00..3,132.90 rows=75,290 width=72) (actual time=0.021..46.876 rows=75,290 loops=1)