explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hssj

Settings
# exclusive inclusive rows x rows loops node
1. 103.495 272.882 ↑ 1.0 1 1

Aggregate (cost=133,830.09..133,830.10 rows=1 width=72) (actual time=272.882..272.882 rows=1 loops=1)

2. 15.855 169.387 ↓ 8.7 68,911 1

Hash Anti Join (cost=1,269.87..133,491.92 rows=7,957 width=29) (actual time=1.510..169.387 rows=68,911 loops=1)

  • Hash Cond: ((api_currentreport.rule_id = u0.rule_id) AND (api_currentreport.system_uuid = u0.system_uuid))
3. 19.407 153.495 ↓ 8.7 68,911 1

Hash Join (cost=1,263.14..133,363.84 rows=7,957 width=33) (actual time=1.462..153.495 rows=68,911 loops=1)

  • Hash Cond: (api_rule.category_id = api_rulecategory.id)
4. 39.950 134.080 ↓ 8.7 68,911 1

Hash Join (cost=1,262.05..133,319.74 rows=7,957 width=26) (actual time=1.449..134.080 rows=68,911 loops=1)

  • Hash Cond: (api_currentreport.rule_id = api_rule.id)
5. 0.000 93.242 ↓ 20.8 208,787 1

Gather (cost=1,025.64..133,056.90 rows=10,033 width=20) (actual time=0.555..93.242 rows=208,787 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
6. 15.912 108.270 ↓ 17.7 104,394 2 / 2

Nested Loop (cost=25.64..131,053.60 rows=5,902 width=20) (actual time=0.298..108.270 rows=104,394 loops=2)

7. 4.837 4.837 ↓ 2.3 9,724 2 / 2

Parallel Index Only Scan using api_host_account_stale_warn_at_system_uuid_index on api_host (cost=0.55..510.52 rows=4,222 width=16) (actual time=0.012..4.837 rows=9,724 loops=2)

  • Index Cond: ((account = '729650'::text) AND (stale_warn_at > '2020-05-16 16:15:44.120677+00'::timestamp with time zone))
  • Heap Fetches: 164
8. 87.337 87.520 ↑ 3.5 11 19,449 / 2

Index Only Scan using curreport_system_uuid_rule_id on api_currentreport (cost=25.09..30.54 rows=38 width=20) (actual time=0.005..0.009 rows=11 loops=19,449)

  • Index Cond: (system_uuid = api_host.system_uuid)
  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 1
  • Heap Fetches: 285
9.          

SubPlan (for Index Only Scan)

10. 0.184 0.184 ↑ 1.0 351 2 / 2

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

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 741
11. 0.113 0.888 ↑ 1.0 1,012 1

Hash (cost=223.76..223.76 rows=1,012 width=10) (actual time=0.888..0.888 rows=1,012 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
12. 0.775 0.775 ↑ 1.0 1,012 1

Seq Scan on api_rule (cost=0.00..223.76 rows=1,012 width=10) (actual time=0.004..0.775 rows=1,012 loops=1)

  • Filter: active
  • Rows Removed by Filter: 264
13. 0.003 0.008 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=15) (actual time=0.007..0.008 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.005 0.005 ↑ 1.0 4 1

Seq Scan on api_rulecategory (cost=0.00..1.04 rows=4 width=15) (actual time=0.004..0.005 rows=4 loops=1)

15. 0.000 0.037 ↓ 0.0 0 1

Hash (cost=6.70..6.70 rows=2 width=20) (actual time=0.037..0.037 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
16. 0.037 0.037 ↓ 0.0 0 1

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

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