explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vUH7

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 943.461 4,264.960 ↑ 631,530.2 4 1

Gather (cost=60,217.00..920,248.37 rows=2,526,121 width=10,389) (actual time=4,264.954..4,264.960 rows=4 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.013 3,321.499 ↑ 1,052,550.0 1 3 / 3

Hash Left Join (cost=59,217.00..666,636.27 rows=1,052,550 width=10,389) (actual time=2,933.675..3,321.499 rows=1 loops=3)

  • Hash Cond: (t1.proc_role_id = t0.id)
3. 109.324 3,321.275 ↑ 1,052,550.0 1 3 / 3

Hash Join (cost=59,206.57..652,153.28 rows=1,052,550 width=4,105) (actual time=2,933.456..3,321.275 rows=1 loops=3)

  • Hash Cond: (t1.user_id = t4.id)
4. 1,901.335 3,182.696 ↑ 1,052,550.0 1 3 / 3

Hash Join (cost=48,084.45..517,347.15 rows=1,052,550 width=362) (actual time=2,881.808..3,182.696 rows=1 loops=3)

  • Hash Cond: (t1.card_id = t5.id)
  • Join Filter: ((hashed SubPlan 1) OR (t1.card_id = 'ff89dc2a-0a46-ece0-841e-216cc841eeaa'::uuid))
  • Rows Removed by Join Filter: 1,140,455
5. 928.990 928.990 ↑ 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=199.255..928.990 rows=1,140,474 loops=3)

  • Filter: ((delete_ts IS NULL) AND ((dtype)::text = '10'::text))
6. 140.782 352.328 ↑ 1.0 855,890 3 / 3

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

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

Seq Scan on wf_card t5 (cost=0.00..33,197.03 rows=855,918 width=16) (actual time=0.119..211.546 rows=855,890 loops=3)

  • Filter: (delete_ts IS NULL)
  • Rows Removed by Filter: 518
8.          

SubPlan (for Hash Join)

9. 0.043 0.043 ↓ 0.0 0 3 / 3

Index Scan using idx_wf_card_family_card on wf_card t6 (cost=0.42..8.44 rows=1 width=16) (actual time=0.043..0.043 rows=0 loops=3)

  • Index Cond: (family_card_id = 'ff89dc2a-0a46-ece0-841e-216cc841eeaa'::uuid)
  • Filter: (delete_ts IS NULL)
10. 20.737 29.255 ↑ 1.0 21,005 3 / 3

Hash (cost=1,197.56..1,197.56 rows=21,005 width=3,743) (actual time=29.255..29.255 rows=21,005 loops=3)

  • Buckets: 2,048 Batches: 16 Memory Usage: 267kB
11. 8.518 8.518 ↑ 1.0 21,005 3 / 3

Seq Scan on sec_user t4 (cost=0.00..1,197.56 rows=21,005 width=3,743) (actual time=0.110..8.518 rows=21,005 loops=3)

  • Filter: ((delete_ts IS NULL) AND active AND ((dtype)::text = '10'::text))
12. 0.019 0.211 ↑ 1.0 34 1 / 3

Hash (cost=10.00..10.00 rows=34 width=6,284) (actual time=0.634..0.634 rows=34 loops=1)

13. 0.011 0.192 ↑ 1.0 34 1 / 3

Hash Left Join (cost=4.83..10.00 rows=34 width=6,284) (actual time=0.518..0.577 rows=34 loops=1)

  • Hash Cond: (t0.role_id = t3.id)
14. 0.011 0.130 ↑ 1.0 34 1 / 3

Hash Left Join (cost=2.31..7.07 rows=34 width=4,868) (actual time=0.348..0.389 rows=34 loops=1)

  • Hash Cond: (t0.proc_id = t2.id)
15. 0.061 0.061 ↑ 1.0 34 1 / 3

Seq Scan on wf_proc_role t0 (cost=0.00..4.34 rows=34 width=251) (actual time=0.160..0.182 rows=34 loops=1)

16. 0.008 0.058 ↑ 1.8 8 1 / 3

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

17. 0.051 0.051 ↑ 1.8 8 1 / 3

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

18. 0.006 0.052 ↓ 1.0 24 1 / 3

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

19. 0.046 0.046 ↓ 1.0 24 1 / 3

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