explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lsYw

Settings
# exclusive inclusive rows x rows loops node
1. 52.728 761.464 ↑ 1.0 1 1

Aggregate (cost=73,988.17..73,988.18 rows=1 width=72) (actual time=761.464..761.464 rows=1 loops=1)

2. 20.599 708.736 ↓ 9.1 68,847 1

Hash Anti Join (cost=1,652.73..73,665.13 rows=7,601 width=17) (actual time=17.153..708.736 rows=68,847 loops=1)

  • Hash Cond: ((api_currentreport.rule_id = u0.rule_id) AND (api_currentreport.system_uuid = u0.system_uuid))
3. 21.406 688.089 ↓ 9.1 68,847 1

Hash Join (cost=1,646.00..73,542.48 rows=7,601 width=33) (actual time=17.092..688.089 rows=68,847 loops=1)

  • Hash Cond: (api_rule.category_id = api_rulecategory.id)
4. 45.190 666.669 ↓ 9.1 68,847 1

Hash Join (cost=1,644.91..73,500.30 rows=7,601 width=26) (actual time=17.072..666.669 rows=68,847 loops=1)

  • Hash Cond: (api_currentreport.rule_id = api_rule.id)
5. 0.000 619.879 ↓ 21.8 208,653 1

Gather (cost=1,417.50..73,247.65 rows=9,584 width=20) (actual time=15.465..619.879 rows=208,653 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 224.275 670.968 ↓ 17.4 69,551 3 / 3

Hash Join (cost=417.50..71,289.25 rows=3,993 width=20) (actual time=14.462..670.968 rows=69,551 loops=3)

  • Hash Cond: (api_currentreport.system_uuid = api_host.system_uuid)
7. 432.537 432.752 ↓ 1.5 1,480,203 3 / 3

Parallel Seq Scan on api_currentreport (cost=24.53..68,329.73 rows=977,728 width=20) (actual time=0.341..432.752 rows=1,480,203 loops=3)

  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 84177
8.          

SubPlan (for Parallel Seq Scan)

9. 0.215 0.215 ↑ 1.0 351 3 / 3

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

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 741
10. 5.809 13.941 ↓ 2.8 19,445 3 / 3

Hash (cost=306.61..306.61 rows=6,909 width=16) (actual time=13.941..13.941 rows=19,445 loops=3)

  • Buckets: 32768 (originally 8192) Batches: 1 (originally 1) Memory Usage: 1168kB
11. 8.132 8.132 ↓ 2.8 19,445 3 / 3

Index Only Scan using api_host_account_stale_warn_at_system_uuid_index on api_host (cost=0.43..306.61 rows=6,909 width=16) (actual time=0.043..8.132 rows=19,445 loops=3)

  • Index Cond: ((account = '729650'::text) AND (stale_warn_at > '2020-05-16 16:16:47.586377+00'::timestamp with time zone))
  • Heap Fetches: 0
12. 0.254 1.600 ↑ 1.0 1,012 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
13. 1.346 1.346 ↑ 1.0 1,012 1

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

  • Filter: active
  • Rows Removed by Filter: 264
14. 0.003 0.014 ↑ 1.0 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.011 0.011 ↑ 1.0 4 1

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

16. 0.001 0.048 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
17. 0.047 0.047 ↓ 0.0 0 1

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

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