explain.depesz.com

PostgreSQL's explain analyze made readable

Result: frEb

Settings
# exclusive inclusive rows x rows loops node
1. 0.069 16,253.648 ↑ 1.0 5 1

Limit (cost=457,649.75..457,649.76 rows=5 width=20) (actual time=16,253.569..16,253.648 rows=5 loops=1)

2. 0.405 16,253.579 ↑ 20.0 5 1

Sort (cost=457,649.75..457,650.00 rows=100 width=20) (actual time=16,253.561..16,253.579 rows=5 loops=1)

  • Sort Key: (count(DISTINCT mi.checksum_sid))
  • Sort Method: top-N heapsort Memory: 25kB
3. 937.148 16,253.174 ↑ 1.0 100 1

GroupAggregate (cost=450,891.98..457,648.09 rows=100 width=20) (actual time=14,434.018..16,253.174 rows=100 loops=1)

  • Group Key: fact.account_sid, mi.activity_type
4. 1,884.172 15,316.026 ↑ 2.2 309,257 1

Sort (cost=450,891.98..452,580.75 rows=675,511 width=16) (actual time=14,430.378..15,316.026 rows=309,257 loops=1)

  • Sort Key: fact.account_sid, mi.activity_type
  • Sort Method: external merge Disk: 7832kB
5. 4,952.807 13,431.854 ↑ 2.2 309,257 1

Hash Join (cost=17,926.32..373,937.03 rows=675,511 width=16) (actual time=2,972.423..13,431.854 rows=309,257 loops=1)

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

Seq Scan on meeting_inheritance mi (cost=0.00..281,819.00 rows=1,223,488 width=12) (actual time=0.153..5,507.515 rows=1,252,026 loops=1)

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

Hash (cost=9,699.92..9,699.92 rows=501,392 width=8) (actual time=2,971.526..2,971.532 rows=501,392 loops=1)

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