explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J0NG

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 58,545.599 ↑ 47.0 1 1

Limit (cost=43,623,669.24..43,623,669.36 rows=47 width=4,240) (actual time=58,545.598..58,545.599 rows=1 loops=1)

2. 0.020 58,545.587 ↑ 47.0 1 1

Sort (cost=43,623,669.24..43,623,669.36 rows=47 width=4,240) (actual time=58,545.586..58,545.587 rows=1 loops=1)

  • Sort Key: run1.run_id, run1.run_name
  • Sort Method: quicksort Memory: 25kB
3. 0.065 58,545.567 ↑ 47.0 1 1

WindowAgg (cost=0.00..43,623,667.94 rows=47 width=4,240) (actual time=58,545.537..58,545.567 rows=1 loops=1)

4. 9,847.872 58,545.502 ↑ 47.0 1 1

Seq Scan on run run1 (cost=0.00..43,623,667.35 rows=47 width=4,232) (actual time=2,635.659..58,545.502 rows=1 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: 1424734
5.          

SubPlan (for Seq Scan)

6. 802.872 15,254.568 ↓ 0.0 0 267,624

Append (cost=0.57..609.30 rows=199 width=0) (actual time=0.057..0.057 rows=0 loops=267,624)

7. 14,451.696 14,451.696 ↓ 0.0 0 267,624

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation4 (cost=0.57..608.30 rows=199 width=0) (actual time=0.054..0.054 rows=0 loops=267,624)

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

Append (cost=28.71..1,870.39 rows=620 width=6) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on relation_default relation4_1 (cost=28.71..1,867.29 rows=620 width=6) (never executed)

  • Recheck Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2094'::numeric) AND (rl_workspace_id = '2003'::numeric))
10. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx (cost=0.00..28.55 rows=620 width=0) (never executed)

  • Index Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2094'::numeric) AND (rl_workspace_id = '2003'::numeric))
11. 508.838 15,010.721 ↓ 0.0 0 254,419

Append (cost=0.57..609.30 rows=199 width=0) (actual time=0.059..0.059 rows=0 loops=254,419)

12. 14,501.883 14,501.883 ↓ 0.0 0 254,419

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation5 (cost=0.57..608.30 rows=199 width=0) (actual time=0.057..0.057 rows=0 loops=254,419)

  • 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: 6931
13. 0.000 0.000 ↓ 0.0 0

Append (cost=28.71..1,870.39 rows=620 width=6) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on relation_default relation5_1 (cost=28.71..1,867.29 rows=620 width=6) (never executed)

  • Recheck Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2104'::numeric) AND (rl_workspace_id = '2003'::numeric))
15. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx (cost=0.00..28.55 rows=620 width=0) (never executed)

  • Index Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2104'::numeric) AND (rl_workspace_id = '2003'::numeric))
16. 494.976 14,354.304 ↓ 0.0 0 247,488

Append (cost=0.57..609.30 rows=199 width=0) (actual time=0.058..0.058 rows=0 loops=247,488)

17. 13,859.328 13,859.328 ↓ 0.0 0 247,488

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation6 (cost=0.57..608.30 rows=199 width=0) (actual time=0.056..0.056 rows=0 loops=247,488)

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

Append (cost=28.71..1,870.39 rows=620 width=6) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on relation_default relation6_1 (cost=28.71..1,867.29 rows=620 width=6) (never executed)

  • Recheck Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2122'::numeric) AND (rl_workspace_id = '2003'::numeric))
20. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx (cost=0.00..28.55 rows=620 width=0) (never executed)

  • Index Cond: ((rl_relation_name = '1100'::numeric) AND (rl_side2_id = '2122'::numeric) AND (rl_workspace_id = '2003'::numeric))
21. 216.510 4,077.605 ↓ 0.0 0 36,085

Nested Loop Semi Join (cost=0.99..13.06 rows=1 width=0) (actual time=0.113..0.113 rows=0 loops=36,085)

22. 144.340 2,453.780 ↑ 1.0 1 36,085

Append (cost=0.43..6.46 rows=1 width=6) (actual time=0.064..0.068 rows=1 loops=36,085)

23. 2,309.440 2,309.440 ↑ 1.0 1 36,085

Index Only Scan using relation_1202_rl_relation_name_rl_side1_id_rl_side2_id_rl_w_idx on relation_1202 relation1 (cost=0.43..6.45 rows=1 width=6) (actual time=0.061..0.064 rows=1 loops=36,085)

  • Index Cond: ((rl_relation_name = '1202'::numeric) AND (rl_side1_id = run1.run_id) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 36085
24. 36.085 1,407.315 ↓ 0.0 0 36,085

Append (cost=0.57..6.60 rows=1 width=5) (actual time=0.039..0.039 rows=0 loops=36,085)

25. 1,371.230 1,371.230 ↓ 0.0 0 36,085

Index Only Scan using relation_default_rl_relation_name_rl_side2_id_rl_side1_id_r_idx on relation_default relation2 (cost=0.57..6.59 rows=1 width=5) (actual time=0.038..0.038 rows=0 loops=36,085)

  • Index Cond: ((rl_relation_name = '1440'::numeric) AND (rl_side2_id = relation1.rl_side2_id) AND (rl_side1_id = '55863'::numeric) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
26. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=612.75..3,779.58 rows=137,638 width=6) (never executed)

27. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=612.33..614.33 rows=200 width=5) (never executed)

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

Append (cost=0.57..611.83 rows=200 width=5) (never executed)

29. 0.000 0.000 ↓ 0.0 0

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..610.83 rows=200 width=5) (never executed)

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

Append (cost=0.43..15.75 rows=8 width=12) (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 relation1_1 (cost=0.43..15.71 rows=8 width=12) (never executed)

  • Index Cond: ((rl_relation_name = '1202'::numeric) AND (rl_side2_id = relation2_1.rl_side2_id) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
32. 0.000 0.000 ↓ 0.0 0

Append (cost=0.43..6.46 rows=1 width=0) (never executed)

33. 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.43..6.45 rows=1 width=0) (never executed)

  • Index Cond: ((rl_relation_name = '1202'::numeric) AND (rl_side2_id = '55863'::numeric) AND (rl_side1_id = run1.run_id) AND (rl_workspace_id = '2003'::numeric))
  • Heap Fetches: 0
34. 0.009 0.432 ↓ 2.1 80 1

Append (cost=0.43..56.04 rows=38 width=6) (actual time=0.070..0.432 rows=80 loops=1)

35. 0.423 0.423 ↓ 2.1 80 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.43..55.85 rows=38 width=6) (actual time=0.069..0.423 rows=80 loops=1)

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