explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HFTK

Settings
# exclusive inclusive rows x rows loops node
1. 0.068 14,396.315 ↑ 1.0 5 1

Limit (cost=404,158.01..404,158.03 rows=5 width=18) (actual time=14,396.237..14,396.315 rows=5 loops=1)

2. 0.418 14,396.247 ↑ 60.0 5 1

Sort (cost=404,158.01..404,158.76 rows=300 width=18) (actual time=14,396.229..14,396.247 rows=5 loops=1)

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

GroupAggregate (cost=400,827.42..404,153.03 rows=300 width=18) (actual time=12,584.047..14,395.829 rows=100 loops=1)

  • Group Key: fact.account_sid, fact.activity_type
4. 1,848.690 13,455.261 ↑ 1.1 309,257 1

Sort (cost=400,827.42..401,658.07 rows=332,261 width=14) (actual time=12,580.436..13,455.261 rows=309,257 loops=1)

  • Sort Key: fact.account_sid
  • Sort Method: external merge Disk: 7840kB
5. 4,787.936 11,606.571 ↑ 1.1 309,257 1

Hash Join (cost=15,241.13..364,675.33 rows=332,261 width=14) (actual time=1,613.801..11,606.571 rows=309,257 loops=1)

  • Hash Cond: (mi.checksum_sid = fact.checksum_sid)
6. 5,205.351 5,205.351 ↓ 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.031..5,205.351 rows=1,252,026 loops=1)

  • Filter: ((NOT is_internal) AND (NOT is_blacklist) AND (NOT is_partner))
  • Rows Removed by Filter: 8747974
7. 1,613.284 1,613.284 ↓ 1.0 247,304 1

Hash (cost=10,953.40..10,953.40 rows=246,618 width=14) (actual time=1,613.279..1,613.284 rows=247,304 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 3928kB
  • -> Seq Scan on derived_activity_account_fact fact (cost=0.00..10953.40 rows=246618 width=14) (actual time=0.441..861.630 rows=247304
  • Filter: ((activity_type)::text = 'meeting'::text)
  • Rows Removed by Filter: 254088