explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SXi1

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=0.42..88,666.15 rows=2,001 width=63) (actual rows= loops=)

2. 194,903.933 194,903.933 ↑ 8.9 224 1

Index Scan Back Limit (cost=0.42..88,666.15 rows=2,001 width=63) (actual time=6,766.306..194,903.933 rows=224 loops=1)

3. 854.818 194,903.853 ↑ 1,199.0 224 1

Index Scan Backward using problem_pkey on problem p (cost=0.42..11,900,926.50 rows=268,579 width=63) (actual time=6,766.305..194,903.853 rows=224 loops=1)

  • Filter: (((r_eventid IS NULL) OR (r_clock > 1592866350)) AND (source = 0) AND (object = 0) AND (NOT (SubPlan 1)))
  • Rows Removed by Filter: 556,466
  • Filter: (((r_eventid IS NULL) OR (r_clock > 1592866350)) AND (source = 0) AND (object = 0) AND (NOT (SubPlan 1)))
4.          

SubPlan (for Index Scan Backward)

5. 1,639.851 194,049.035 ↑ 9.0 1 546,617

HashAggregate (cost=21.57..21.70 rows=9 width=12) (actual time=0.355..0.355 rows=1 loops=546,617)

  • Filter: ((max(r.permission) < 2) OR (min(r.permission) IS NULL) OR (min(r.permission) = 0))
  • Rows Removed by Filter: 0
6. 4,436.305 192,409.184 ↓ 1.4 13 546,617

Nested Loop Left Join (cost=1.56..21.48 rows=9 width=12) (actual time=0.047..0.352 rows=13 loops=546,617)

7. 1,679.414 26,784.233 ↓ 1.4 13 546,617

Nested Loop (cost=1.27..16.15 rows=9 width=16) (actual time=0.017..0.049 rows=13 loops=546,617)

8. 937.888 17,491.744 ↓ 1.5 3 546,617

Nested Loop (cost=0.85..15.08 rows=2 width=8) (actual time=0.013..0.032 rows=3 loops=546,617)

9. 4,372.936 4,372.936 ↓ 1.5 3 546,617

Index Scan using functions_1 on functions f (cost=0.43..6.16 rows=2 width=8) (actual time=0.006..0.008 rows=3 loops=546,617)

  • Index Cond: (p.objectid = triggerid)
10. 12,180.920 12,180.920 ↑ 1.0 1 1,522,615

Index Scan using items_pkey on items i (cost=0.43..4.45 rows=1 width=16) (actual time=0.007..0.008 rows=1 loops=1,522,615)

  • Index Cond: (itemid = f.itemid)
11. 7,613.075 7,613.075 ↓ 1.2 5 1,522,615

Index Only Scan using hosts_groups_1 on hosts_groups hgg (cost=0.41..0.50 rows=4 width=16) (actual time=0.004..0.005 rows=5 loops=1,522,615)

  • Index Cond: (hostid = i.hostid)
  • Heap Fetches: 21,144
12. 161,188.646 161,188.646 ↓ 0.0 0 7,008,202

Index Scan using rights_2 on rights r (cost=0.29..0.58 rows=1 width=12) (actual time=0.023..0.023 rows=0 loops=7,008,202)

  • Index Cond: (id = hgg.groupid)
  • Filter: (groupid = 128,545)
13. 0.000 0.000 ↓ 0.0

Rows Removed by Filter: 12ward using problem_pkey on problem p (cost=0.42..11,900,926.50 rows=268,579 width=63) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

HashAggregate (cost=21.57..21.70 rows=9 width=12) (actual rows= loops=)

  • Filter: ((max(r.permission) < 2) OR (min(r.permission) IS NULL) OR (min(r.permission) = 0))
15. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.56..21.48 rows=9 width=12) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..16.15 rows=9 width=16) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..15.08 rows=2 width=8) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using functions_1 on functions f (cost=0.43..6.16 rows=2 width=8) (actual rows= loops=)

  • Index Cond: (p.objectid = triggerid)
19. 0.000 0.000 ↓ 0.0

Index Scan using items_pkey on items i (cost=0.43..4.45 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (itemid = f.itemid)
20. 0.000 0.000 ↓ 0.0

Index Only Scan using hosts_groups_1 on hosts_groups hgg (cost=0.41..0.50 rows=4 width=16) (actual rows= loops=)

  • Index Cond: (hostid = i.hostid)
21. 0.000 0.000 ↓ 0.0

Index Scan using rights_2 on rights r (cost=0.29..0.58 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (id = hgg.groupid)
  • Filter: (groupid = 128,545)