explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yZwF

Settings
# exclusive inclusive rows x rows loops node
1. 0.090 18,655.393 ↑ 1.0 5 1

Limit (cost=456,245.07..456,245.08 rows=5 width=18) (actual time=18,655.315..18,655.393 rows=5 loops=1)

2. 0.395 18,655.303 ↑ 60.0 5 1

Sort (cost=456,245.07..456,245.82 rows=300 width=18) (actual time=18,655.287..18,655.303 rows=5 loops=1)

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

GroupAggregate (cost=449,481.98..456,240.09 rows=300 width=18) (actual time=16,825.980..18,654.908 rows=100 loops=1)

  • Group Key: fact.account_sid, fact.activity_type
4. 1,885.057 17,712.969 ↑ 2.2 309,257 1

Sort (cost=449,481.98..451,170.75 rows=675,511 width=14) (actual time=16,822.389..17,712.969 rows=309,257 loops=1)

  • Sort Key: fact.account_sid, fact.activity_type
  • Sort Method: external merge Disk: 7832kB
5. 5,124.228 15,827.912 ↑ 2.2 309,257 1

Hash Join (cost=18,416.32..372,527.03 rows=675,511 width=14) (actual time=3,125.596..15,827.912 rows=309,257 loops=1)

  • Hash Cond: (mi.checksum_sid = fact.checksum_sid)
6. 7,578.718 7,578.718 ↓ 1.0 1,252,026 1

Seq Scan on meeting_inheritance mi (cost=0.00..281,819.00 rows=1,223,488 width=4) (actual time=0.020..7,578.718 rows=1,252,026 loops=1)

  • Filter: ((NOT is_internal) AND (NOT is_blacklist) AND (NOT is_partner))
  • Rows Removed by Filter: 8747974
7. 3,124.966 3,124.966 ↑ 1.0 501,392 1

Hash (cost=9,699.92..9,699.92 rows=501,392 width=14) (actual time=3,124.961..3,124.966 rows=501,392 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3976kB
  • -> Seq Scan on derived_activity_account_fact fact (cost=0.00..9699.92 rows=501392 width=14) (actual time=0.010..1595.557 rows=501392