explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BYRw

Settings
# exclusive inclusive rows x rows loops node
1. 41.122 159.832 ↑ 1.0 1 1

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

2. 0.000 118.710 ↓ 3.1 68,847 1

Gather (cost=1,260.74..40,358.44 rows=22,465 width=17) (actual time=5.577..118.710 rows=68,847 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 7.672 124.985 ↓ 2.5 22,949 3 / 3

Hash Anti Join (cost=260.74..37,111.94 rows=9,360 width=17) (actual time=2.996..124.985 rows=22,949 loops=3)

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

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

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

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

6. 12.316 45.266 ↑ 1.6 23,214 3 / 3

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

  • Hash Cond: (api_currentreport.rule_id = api_rule.id)
7. 31.889 32.063 ↓ 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.276..32.063 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.174 0.174 ↑ 1.0 351 3 / 3

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
11. 0.702 0.702 ↑ 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.702 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:16:47.586377+00'::timestamp with time zone))
  • Heap Fetches: 0
13. 0.003 0.022 ↑ 1.0 4 3 / 3

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

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

Seq Scan on api_rulecategory (cost=0.00..1.04 rows=4 width=15) (actual time=0.018..0.019 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.039..0.040 rows=0 loops=3)

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