explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rmjj

Settings
# exclusive inclusive rows x rows loops node
1. 2.147 507.078 ↑ 1.0 1 1

Aggregate (cost=106,366.88..106,366.89 rows=1 width=8) (actual time=507.078..507.078 rows=1 loops=1)

2. 10.270 504.931 ↓ 2.6 19,882 1

Finalize GroupAggregate (cost=42,579.79..106,271.95 rows=7,594 width=32) (actual time=312.778..504.931 rows=19,882 loops=1)

  • Group Key: api_host.system_uuid
3. 46.064 494.661 ↓ 3.1 19,882 1

Gather Merge (cost=42,579.79..106,180.19 rows=6,328 width=16) (actual time=312.749..494.661 rows=19,882 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 18.104 448.597 ↓ 2.1 6,627 3 / 3

Partial GroupAggregate (cost=41,579.76..104,449.76 rows=3,164 width=16) (actual time=297.310..448.597 rows=6,627 loops=3)

  • Group Key: api_host.system_uuid
5. 16.491 430.493 ↓ 23.6 74,768 3 / 3

Nested Loop Left Join (cost=41,579.76..104,410.21 rows=3,164 width=16) (actual time=297.283..430.493 rows=74,768 loops=3)

6. 24.505 367.611 ↓ 2.1 6,627 3 / 3

Merge Join (cost=41,579.21..44,708.28 rows=3,164 width=20) (actual time=297.264..367.611 rows=6,627 loops=3)

  • Merge Cond: (api_host.system_uuid = api_upload.host_id)
7. 192.528 334.405 ↑ 1.2 125,886 3 / 3

Sort (cost=41,574.90..41,963.32 rows=155,369 width=16) (actual time=297.210..334.405 rows=125,886 loops=3)

  • Sort Key: api_host.system_uuid
  • Sort Method: external merge Disk: 3664kB
8. 141.877 141.877 ↑ 1.2 125,889 3 / 3

Parallel Seq Scan on api_host (cost=0.00..25,521.44 rows=155,369 width=16) (actual time=0.315..141.877 rows=125,889 loops=3)

  • Filter: (stale_warn_at > '2020-03-25 19:03:04.117148+00'::timestamp with time zone)
  • Rows Removed by Filter: 359328
9. 8.701 8.701 ↑ 1.5 20,114 3 / 3

Index Only Scan using api_upload_account_host_id on api_upload (cost=0.42..2,254.74 rows=29,618 width=20) (actual time=0.043..8.701 rows=20,114 loops=3)

  • Index Cond: (account = '729650'::text)
  • Heap Fetches: 490
10. 46.391 46.391 ↑ 11.7 11 19,882 / 3

Index Only Scan using api_currentreport_upload_id_f4c6735d on api_currentreport (cost=0.56..17.58 rows=129 width=4) (actual time=0.005..0.007 rows=11 loops=19,882)

  • Index Cond: (upload_id = api_upload.id)
  • Heap Fetches: 4823
Planning time : 0.574 ms
Execution time : 507.995 ms