explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WLz

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 2,711.992 ↓ 0.0 0 1

Limit (cost=26,546,211.76..26,546,212.04 rows=111 width=666) (actual time=2,711.992..2,711.992 rows=0 loops=1)

2. 0.009 2,711.990 ↓ 0.0 0 1

Sort (cost=26,546,211.76..26,546,216.54 rows=1,911 width=666) (actual time=2,711.990..2,711.990 rows=0 loops=1)

  • Sort Key: run1.run_id, run1.run_name
  • Sort Method: quicksort Memory: 25kB
3. 0.006 2,711.981 ↓ 0.0 0 1

WindowAgg (cost=0.00..26,546,137.29 rows=1,911 width=666) (actual time=2,711.981..2,711.981 rows=0 loops=1)

4. 1,037.184 2,711.975 ↓ 0.0 0 1

Seq Scan on run run1 (cost=0.00..26,546,113.40 rows=1,911 width=658) (actual time=2,711.975..2,711.975 rows=0 loops=1)

  • Filter: ((run_workspace_id = '2003'::numeric) AND ((lower((run_subtype)::text) = 'run_automated'::text) OR (lower((run_subtype)::text) = 'run_manual'::text)) AND ((alternatives: SubPlan 5 or hashed SubPlan 6) OR (alternatives: SubPlan 7 or hashed SubPlan 8) OR (alternatives: SubPlan 9 or hashed SubPlan 10)) AND ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (alternatives: SubPlan 3 or hashed SubPlan 4)))
  • Rows Removed by Filter: 1465622
5.          

SubPlan (for Seq Scan)

6. 0.000 1,647.138 ↓ 0.0 0 274,523

Append (cost=0.57..12.66 rows=203 width=0) (actual time=0.006..0.006 rows=0 loops=274,523)

7. 1,647.138 1,647.138 ↓ 0.0 0 274,523

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation4 (cost=0.57..11.64 rows=203 width=0) (actual time=0.006..0.006 rows=0 loops=274,523)

  • Index Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2092'::numeric) AND (rl_side1_id = run1.run_id) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 18
8. 0.000 0.000 ↓ 0.0 0

Append (cost=0.57..1,234.62 rows=21,599 width=6) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation4_1 (cost=0.57..1,126.62 rows=21,599 width=6) (never executed)

  • Index Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2092'::numeric) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
10. 0.000 0.000 ↓ 0.0 0

Append (cost=0.57..12.66 rows=203 width=0) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation5 (cost=0.57..11.64 rows=203 width=0) (never executed)

  • Index Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2104'::numeric) AND (rl_side1_id = run1.run_id) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
12. 0.665 6.310 ↓ 12.0 7,428 1

Append (cost=0.57..37.97 rows=620 width=6) (actual time=0.070..6.310 rows=7,428 loops=1)

13. 5.645 5.645 ↓ 12.0 7,428 1

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation5_1 (cost=0.57..34.87 rows=620 width=6) (actual time=0.070..5.645 rows=7,428 loops=1)

  • Index Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2104'::numeric) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 1
14. 0.000 0.000 ↓ 0.0 0

Append (cost=0.57..12.66 rows=203 width=0) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation6 (cost=0.57..11.64 rows=203 width=0) (never executed)

  • Index Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2119'::numeric) AND (rl_side1_id = run1.run_id) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
16. 2.395 21.282 ↓ 45.5 28,189 1

Append (cost=0.57..37.97 rows=620 width=6) (actual time=0.068..21.282 rows=28,189 loops=1)

17. 18.887 18.887 ↓ 45.5 28,189 1

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation6_1 (cost=0.57..34.87 rows=620 width=6) (actual time=0.067..18.887 rows=28,189 loops=1)

  • Index Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2119'::numeric) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 18
18. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=0.84..9.90 rows=1 width=0) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Append (cost=0.28..6.30 rows=1 width=6) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Index Only Scan using relation_1202_rl_relation_name_rl_side1_id_rl_side2_id_rl_w_idx on relation_1202 relation1 (cost=0.28..6.30 rows=1 width=6) (never executed)

  • Index Cond: ((rl_relation_name = '1202'::numeric) AND (rl_side1_id = run1.run_id) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
21. 0.000 0.000 ↓ 0.0 0

Append (cost=0.57..3.60 rows=1 width=5) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation2 (cost=0.57..3.59 rows=1 width=5) (never executed)

  • Index Cond: ((rl_relation_name = '1440'::numeric) AND (rl_side2_id = relation1.rl_side2_id) AND (rl_side1_id = '86646'::numeric) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
23. 0.011 0.051 ↓ 0.0 0 1

Hash Join (cost=17.33..43.02 rows=83 width=6) (actual time=0.050..0.051 rows=0 loops=1)

  • Hash Cond: (relation1_1.rl_side2_id = relation2_1.rl_side2_id)
24. 0.001 0.016 ↑ 161.0 1 1

Append (cost=0.00..24.34 rows=161 width=12) (actual time=0.016..0.016 rows=1 loops=1)

25. 0.015 0.015 ↑ 161.0 1 1

Seq Scan on relation_1202 relation1_1 (cost=0.00..23.54 rows=161 width=12) (actual time=0.015..0.015 rows=1 loops=1)

  • Filter: ((rl_relation_name = '1202'::numeric) AND (rl_workspace_id = '2003'::numeric))
  • Rows Removed by Filter: 2
26. 0.000 0.024 ↓ 0.0 0 1

Hash (cost=14.77..14.77 rows=205 width=5) (actual time=0.024..0.024 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
27. 0.004 0.024 ↓ 0.0 0 1

HashAggregate (cost=12.72..14.77 rows=205 width=5) (actual time=0.024..0.024 rows=0 loops=1)

  • Group Key: relation2_1.rl_side2_id
28. 0.000 0.020 ↓ 0.0 0 1

Append (cost=0.57..12.21 rows=205 width=5) (actual time=0.020..0.020 rows=0 loops=1)

29. 0.020 0.020 ↓ 0.0 0 1

Index Only Scan using relation_default_rl_relation_name_rl_side1_id_rl_side2_id_r_idx on relation_default relation2_1 (cost=0.57..11.18 rows=205 width=5) (actual time=0.020..0.020 rows=0 loops=1)

  • Index Cond: ((rl_relation_name = '1440'::numeric) AND (rl_side1_id = '86646'::numeric) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
30. 0.000 0.000 ↓ 0.0 0

Append (cost=0.28..6.31 rows=1 width=0) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Index Only Scan using relation_1202_rl_relation_name_rl_side2_id_rl_side1_id_rl_w_idx on relation_1202 relation3 (cost=0.28..6.30 rows=1 width=0) (never executed)

  • Index Cond: ((rl_relation_name = '1202'::numeric) AND (rl_side2_id = '86646'::numeric) AND (rl_side1_id = run1.run_id) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
32. 0.000 0.010 ↓ 0.0 0 1

Append (cost=0.28..6.30 rows=1 width=6) (actual time=0.010..0.010 rows=0 loops=1)

33. 0.010 0.010 ↓ 0.0 0 1

Index Only Scan using relation_1202_rl_relation_name_rl_side2_id_rl_side1_id_rl_w_idx on relation_1202 relation3_1 (cost=0.28..6.30 rows=1 width=6) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: ((rl_relation_name = '1202'::numeric) AND (rl_side2_id = '86646'::numeric) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0