explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bfud : Optimization for: plan #vUH7

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 156.879 3,000.269 ↑ 7.8 4 1

Gather (cost=50,753.26..521,697.03 rows=31 width=10,389) (actual time=3,000.263..3,000.269 rows=4 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.007 2,843.390 ↑ 13.0 1 3 / 3

Hash Left Join (cost=49,753.26..520,693.93 rows=13 width=10,389) (actual time=2,646.375..2,843.390 rows=1 loops=3)

  • Hash Cond: (t0.role_id = t3.id)
3. 0.008 2,843.329 ↑ 13.0 1 3 / 3

Hash Left Join (cost=49,750.75..520,691.25 rows=13 width=8,973) (actual time=2,646.315..2,843.329 rows=1 loops=3)

  • Hash Cond: (t0.proc_id = t2.id)
4. 0.003 2,843.242 ↑ 13.0 1 3 / 3

Nested Loop Left Join (cost=49,748.43..520,688.78 rows=13 width=4,356) (actual time=2,646.229..2,843.242 rows=1 loops=3)

5. 0.006 2,843.231 ↑ 13.0 1 3 / 3

Nested Loop (cost=49,748.29..520,686.73 rows=13 width=4,105) (actual time=2,646.222..2,843.231 rows=1 loops=3)

6. 1,501.862 2,843.197 ↑ 13.0 1 3 / 3

Hash Join (cost=49,748.00..520,682.72 rows=13 width=362) (actual time=2,646.204..2,843.197 rows=1 loops=3)

  • Hash Cond: (t1.card_id = t5.id)
  • Join Filter: ((t1.card_id = 'ff89dc2a-0a46-ece0-841e-216cc841eeaa'::uuid) OR (t5.family_card_id = 'ff89dc2a-0a46-ece0-841e-216cc841eeaa'::uuid))
  • Rows Removed by Join Filter: 1,140,455
7. 955.369 955.369 ↑ 1.8 1,140,474 3 / 3

Parallel Seq Scan on wf_card_role t1 (cost=0.00..226,381.52 rows=2,106,281 width=362) (actual time=184.210..955.369 rows=1,140,474 loops=3)

  • Filter: ((delete_ts IS NULL) AND ((dtype)::text = '10'::text))
8. 137.546 385.966 ↑ 1.0 855,890 3 / 3

Hash (cost=33,197.03..33,197.03 rows=855,918 width=32) (actual time=385.966..385.966 rows=855,890 loops=3)

  • Buckets: 131,072 Batches: 16 Memory Usage: 3,529kB
9. 248.420 248.420 ↑ 1.0 855,890 3 / 3

Seq Scan on wf_card t5 (cost=0.00..33,197.03 rows=855,918 width=32) (actual time=0.115..248.420 rows=855,890 loops=3)

  • Filter: (delete_ts IS NULL)
  • Rows Removed by Filter: 518
10. 0.028 0.028 ↑ 1.0 1 4 / 3

Index Scan using sec_user_pkey on sec_user t4 (cost=0.29..0.31 rows=1 width=3,743) (actual time=0.021..0.021 rows=1 loops=4)

  • Index Cond: (id = t1.user_id)
  • Filter: ((delete_ts IS NULL) AND active AND ((dtype)::text = '10'::text))
11. 0.008 0.008 ↑ 1.0 1 4 / 3

Index Scan using wf_proc_role_pkey on wf_proc_role t0 (cost=0.14..0.16 rows=1 width=251) (actual time=0.006..0.006 rows=1 loops=4)

  • Index Cond: (id = t1.proc_role_id)
12. 0.005 0.079 ↑ 1.8 8 1 / 3

Hash (cost=2.14..2.14 rows=14 width=4,617) (actual time=0.236..0.236 rows=8 loops=1)

13. 0.073 0.073 ↑ 1.8 8 1 / 3

Seq Scan on wf_proc t2 (cost=0.00..2.14 rows=14 width=4,617) (actual time=0.214..0.220 rows=8 loops=1)

14. 0.006 0.054 ↓ 1.0 24 1 / 3

Hash (cost=2.23..2.23 rows=23 width=1,416) (actual time=0.161..0.161 rows=24 loops=1)

15. 0.048 0.048 ↓ 1.0 24 1 / 3

Seq Scan on sec_role t3 (cost=0.00..2.23 rows=23 width=1,416) (actual time=0.131..0.143 rows=24 loops=1)