explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QmhD : Optimization for: plan #7ZND

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 17,407.584 40,269.140 ↓ 1.7 418,140 1

Sort (cost=568,387.98..569,015.35 rows=250,947 width=541) (actual time=39,964.529..40,269.140 rows=418,140 loops=1)

  • Sort Key: policyendo2_.pe_issue_date
  • Sort Method: external merge Disk: 199584kB
2. 6,423.784 22,861.556 ↓ 1.7 418,140 1

Hash Join (cost=88,688.61..363,181.77 rows=250,947 width=541) (actual time=5,443.702..22,861.556 rows=418,140 loops=1)

  • Hash Cond: ((policyendo2_.pe_policy_head_oid)::text = (takers15_.pet_policy_head_oid)::text)
3. 465.093 15,028.393 ↓ 1.7 417,983 1

Hash Join (cost=63,158.73..276,533.99 rows=250,790 width=564) (actual time=4,034.250..15,028.393 rows=417,983 loops=1)

  • Hash Cond: ((policyhead10_.wf_status_oid)::text = (wfstatuspo12_.oid)::text)
4. 434.454 14,563.242 ↓ 1.7 417,983 1

Hash Join (cost=63,156.52..273,083.41 rows=250,790 width=538) (actual time=4,034.167..14,563.242 rows=417,983 loops=1)

  • Hash Cond: ((policyendo2_.pe_broker_oid)::text = (producerpo8_.oid)::text)
5. 4,914.165 14,125.946 ↓ 1.7 417,983 1

Hash Join (cost=61,523.17..268,001.70 rows=250,790 width=512) (actual time=4,031.312..14,125.946 rows=417,983 loops=1)

  • Hash Cond: ((policyendo2_.pe_policy_head_oid)::text = (policyhead10_.oid)::text)
6. 416.898 8,192.730 ↑ 1.0 417,983 1

Hash Join (cost=50,153.78..212,395.03 rows=417,983 width=334) (actual time=2,910.199..8,192.730 rows=417,983 loops=1)

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

Hash Join (cost=50,151.57..206,645.55 rows=417,983 width=306) (actual time=2,910.129..7,775.784 rows=417,983 loops=1)

  • Hash Cond: ((policyendo2_.pe_producer_oid)::text = (producerpo6_.oid)::text)
8. 523.842 7,377.584 ↑ 1.0 417,983 1

Hash Join (cost=48,518.22..199,264.93 rows=417,983 width=280) (actual time=2,907.305..7,377.584 rows=417,983 loops=1)

  • Hash Cond: ((policyendo2_.pe_group_oid)::text = (grouppo3_.oid)::text)
9. 2,986.957 6,774.556 ↑ 1.0 417,983 1

Hash Join (cost=41,991.49..184,378.54 rows=417,983 width=237) (actual time=2,828.108..6,774.556 rows=417,983 loops=1)

  • Hash Cond: ((policypayp0_.ppp_endorsement_oid)::text = (policyendo2_.oid)::text)
10. 972.044 972.044 ↑ 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=0.067..972.044 rows=417,983 loops=1)

11. 2,343.945 2,815.555 ↑ 1.0 442,955 1

Hash (cost=25,207.55..25,207.55 rows=442,955 width=178) (actual time=2,815.555..2,815.555 rows=442,955 loops=1)

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

Seq Scan on policy_endorsement policyendo2_ (cost=0.00..25,207.55 rows=442,955 width=178) (actual time=0.018..471.610 rows=442,955 loops=1)

13. 2.830 79.186 ↑ 1.0 6,250 1

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

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

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

  • Hash Cond: ((personpo5_.oid)::text = (entitypo4_.ent_person_oid)::text)
15. 15.015 15.015 ↑ 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.003..15.015 rows=75,290 loops=1)

16. 3.245 32.191 ↑ 1.0 6,250 1

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

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

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

  • Hash Cond: ((entitypo4_.oid)::text = (grouppo3_.group_entity_oid)::text)
18. 7.334 7.334 ↑ 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.004..7.334 rows=38,808 loops=1)

19. 2.664 5.696 ↑ 1.0 6,250 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 633kB
20. 3.032 3.032 ↑ 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..3.032 rows=6,250 loops=1)

21. 0.166 2.814 ↑ 1.0 205 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
22. 0.335 2.648 ↑ 1.0 205 1

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

23. 0.058 0.058 ↑ 1.0 205 1

Seq Scan on app_productor producerpo6_ (cost=0.00..7.05 rows=205 width=80) (actual time=0.006..0.058 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.011..0.011 rows=1 loops=205)

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

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

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

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

27. 729.381 1,019.051 ↓ 1.7 155,900 1

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

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

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

  • Hash Cond: ((policyhead10_.ph_template_oid)::text = (productpo11_.oid)::text)
29. 128.994 128.994 ↑ 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.004..128.994 rows=155,900 loops=1)

30. 0.030 0.375 ↑ 1.2 55 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
31. 0.058 0.345 ↑ 1.2 55 1

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

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

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

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

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

34. 0.012 0.025 ↑ 1.0 30 1

Hash (cost=1.30..1.30 rows=30 width=120) (actual time=0.025..0.025 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.004..0.013 rows=30 loops=1)

36. 0.070 0.143 ↑ 1.0 183 1

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

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

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

38. 0.178 2.842 ↑ 1.0 205 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
39. 0.354 2.664 ↑ 1.0 205 1

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

40. 0.055 0.055 ↑ 1.0 205 1

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

41. 2.255 2.255 ↑ 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.011..0.011 rows=1 loops=205)

  • Index Cond: ((oid)::text = (producerpo8_.pro_person_oid)::text)
42. 0.029 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
43. 0.029 0.029 ↑ 1.0 54 1

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

44. 444.411 1,409.379 ↑ 1.0 155,978 1

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

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

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

  • Hash Cond: ((takers15_.pet_entity_oid)::text = (entitypo16_.oid)::text)
46. 61.530 61.530 ↑ 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.007..61.530 rows=155,978 loops=1)

47. 80.645 451.278 ↑ 1.0 38,808 1

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

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

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

  • Hash Cond: ((entitypo16_.ent_person_oid)::text = (personpo17_.oid)::text)
49. 18.786 18.786 ↑ 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.004..18.786 rows=38,808 loops=1)

50. 166.879 210.389 ↑ 1.0 75,290 1

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

  • Buckets: 1024 Batches: 8 Memory Usage: 994kB
51. 43.510 43.510 ↑ 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.005..43.510 rows=75,290 loops=1)