explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Yz5c

Settings
# exclusive inclusive rows x rows loops node
1. 0.079 24,449.758 ↑ 1.0 5 1

Limit (cost=163,723.05..163,723.06 rows=5 width=18) (actual time=24,449.686..24,449.758 rows=5 loops=1)

2. 0.472 24,449.679 ↑ 60.0 5 1

Sort (cost=163,723.05..163,723.80 rows=300 width=18) (actual time=24,449.666..24,449.679 rows=5 loops=1)

  • Sort Key: (count(DISTINCT mi.checksum_sid))
  • Sort Method: top-N heapsort Memory: 25kB
3. 970.020 24,449.207 ↑ 3.0 100 1

GroupAggregate (cost=156,959.96..163,718.07 rows=300 width=18) (actual time=22,593.391..24,449.207 rows=100 loops=1)

  • Group Key: fact.account_sid, fact.activity_type
4. 1,950.022 23,479.187 ↑ 2.2 309,257 1

Sort (cost=156,959.96..158,648.73 rows=675,511 width=14) (actual time=22,589.655..23,479.187 rows=309,257 loops=1)

  • Sort Key: fact.account_sid, fact.activity_type
  • Sort Method: external merge Disk: 7840kB
5. 21,529.165 21,529.165 ↑ 2.2 309,257 1

Merge Join (cost=9.02..80,005.01 rows=675,511 width=14) (actual time=0.958..21,529.165 rows=309,257 loops=1)

  • Merge Cond: (fact.checksum_sid = mi.checksum_sid)
  • -> Index Scan using checksumindexfact on derived_activity_account_fact fact (cost=0.42..31647.51 rows=501392 width=14) (actual time=0.011.
  • -> Index Only Scan using partial_index on meeting_inheritance mi (cost=0.43..54035.43 rows=1223488 width=4) (actual time=0.295..14941.352
  • Heap Fetches: 1287608