explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vi0g

Settings
# exclusive inclusive rows x rows loops node
1. 95.209 203.390 ↑ 1.0 1 1

Aggregate (cost=41,313.21..41,313.22 rows=1 width=72) (actual time=203.390..203.390 rows=1 loops=1)

2. 0.000 108.181 ↓ 3.1 68,847 1

Gather (cost=1,260.74..40,358.44 rows=22,465 width=29) (actual time=5.990..108.181 rows=68,847 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 7.689 122.913 ↓ 2.5 22,949 3 / 3

Hash Anti Join (cost=260.74..37,111.94 rows=9,360 width=29) (actual time=3.129..122.913 rows=22,949 loops=3)

  • Hash Cond: ((api_currentreport.rule_id = u0.rule_id) AND (api_currentreport.system_uuid = u0.system_uuid))
4. 7.738 115.184 ↓ 2.5 22,949 3 / 3

Hash Join (cost=254.01..36,962.47 rows=9,360 width=33) (actual time=3.050..115.184 rows=22,949 loops=3)

  • Hash Cond: (api_rule.category_id = api_rulecategory.id)
5. 16.394 107.430 ↓ 2.5 22,949 3 / 3

Nested Loop (cost=252.92..36,910.78 rows=9,360 width=26) (actual time=3.003..107.430 rows=22,949 loops=3)

6. 11.988 44.609 ↑ 1.6 23,214 3 / 3

Hash Join (cost=252.50..8,864.80 rows=37,893 width=26) (actual time=2.966..44.609 rows=23,214 loops=3)

  • Hash Cond: (api_currentreport.rule_id = api_rule.id)
7. 31.572 31.719 ↓ 1.5 70,487 3 / 3

Parallel Index Only Scan using api_currentreport_account_rule_id_system_uuid_f48d4524_uniq on api_currentreport (cost=25.09..8,511.56 rows=47,778 width=20) (actual time=0.250..31.719 rows=70,487 loops=3)

  • Index Cond: (account = '729650'::text)
  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 5756
  • Heap Fetches: 0
8.          

SubPlan (for Parallel Index Only Scan)

9. 0.147 0.147 ↑ 1.0 351 3 / 3

Seq Scan on api_ack u2 (cost=0.00..23.65 rows=351 width=4) (actual time=0.007..0.147 rows=351 loops=3)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 741
10. 0.205 0.902 ↑ 1.0 1,012 3 / 3

Hash (cost=214.76..214.76 rows=1,012 width=10) (actual time=0.902..0.902 rows=1,012 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
11. 0.697 0.697 ↑ 1.0 1,012 3 / 3

Seq Scan on api_rule (cost=0.00..214.76 rows=1,012 width=10) (actual time=0.007..0.697 rows=1,012 loops=3)

  • Filter: active
  • Rows Removed by Filter: 264
12. 46.427 46.427 ↑ 1.0 1 69,641 / 3

Index Only Scan using host_system_uuid_stale_warn_at on api_host (cost=0.43..0.74 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=69,641)

  • Index Cond: ((system_uuid = api_currentreport.system_uuid) AND (stale_warn_at > '2020-05-16 16:15:44.120677+00'::timestamp with time zone))
  • Heap Fetches: 0
13. 0.003 0.016 ↑ 1.0 4 3 / 3

Hash (cost=1.04..1.04 rows=4 width=15) (actual time=0.016..0.016 rows=4 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.013 0.013 ↑ 1.0 4 3 / 3

Seq Scan on api_rulecategory (cost=0.00..1.04 rows=4 width=15) (actual time=0.012..0.013 rows=4 loops=3)

15. 0.000 0.040 ↓ 0.0 0 3 / 3

Hash (cost=6.70..6.70 rows=2 width=20) (actual time=0.040..0.040 rows=0 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
16. 0.040 0.040 ↓ 0.0 0 3 / 3

Seq Scan on api_hostack u0 (cost=0.00..6.70 rows=2 width=20) (actual time=0.040..0.040 rows=0 loops=3)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 216
Planning time : 3.834 ms
Execution time : 203.870 ms