explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JWhC

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1,788.945 ↑ 1.0 5 1

Limit (cost=251,286.85..251,286.86 rows=5 width=20) (actual time=1,788.944..1,788.945 rows=5 loops=1)

2. 0.043 1,788.943 ↑ 19.8 5 1

Sort (cost=251,286.85..251,287.10 rows=99 width=20) (actual time=1,788.943..1,788.943 rows=5 loops=1)

  • Sort Key: (count(DISTINCT mi.checksum_sid)) DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 6.872 1,788.900 ↑ 1.0 99 1

GroupAggregate (cost=249,937.88..251,285.21 rows=99 width=20) (actual time=1,779.806..1,788.900 rows=99 loops=1)

  • Group Key: fact.account_sid, fact.activity_type
4. 8.793 1,782.028 ↑ 5.1 26,438 1

Sort (cost=249,937.88..250,274.46 rows=134,634 width=16) (actual time=1,779.769..1,782.028 rows=26,438 loops=1)

  • Sort Key: fact.account_sid, fact.activity_type
  • Sort Method: quicksort Memory: 2008kB
5. 51.128 1,773.235 ↑ 5.1 26,438 1

Hash Join (cost=56,803.94..236,164.95 rows=134,634 width=16) (actual time=365.433..1,773.235 rows=26,438 loops=1)

  • Hash Cond: (mi.checksum_sid = fact.checksum_sid)
6. 1,361.250 1,640.246 ↑ 1.0 106,097 1

Bitmap Heap Scan on meeting_inheritance mi (cost=47,719.60..219,979.33 rows=109,361 width=4) (actual time=282.712..1,640.246 rows=106,097 loops=1)

  • Recheck Cond: ((activity_date > 1544316837) AND (activity_date < 1549673664))
  • Rows Removed by Index Recheck: 7519205
  • Filter: ((NOT is_internal) AND (NOT is_blacklist) AND (NOT is_partner))
  • Rows Removed by Filter: 637960
  • Heap Blocks: exact=16674 lossy=158437
7. 11.148 278.996 ↓ 0.0 0 1

BitmapAnd (cost=47,719.60..47,719.60 rows=109,361 width=0) (actual time=278.996..278.996 rows=0 loops=1)

8. 119.897 119.897 ↑ 1.0 847,617 1

Bitmap Index Scan on activitydatemh (cost=0.00..18,387.31 rows=876,687 width=0) (actual time=119.897..119.897 rows=847,617 loops=1)

  • Index Cond: ((activity_date > 1544316837) AND (activity_date < 1549673664))
9. 147.951 147.951 ↓ 1.0 1,250,247 1

Bitmap Index Scan on combinedmi (cost=0.00..29,277.36 rows=1,247,434 width=0) (actual time=147.951..147.951 rows=1,250,247 loops=1)

  • Index Cond: ((is_blacklist = false) AND (is_partner = false) AND (is_internal = false))
10. 45.162 81.861 ↑ 1.0 247,304 1

Hash (cost=4,785.04..4,785.04 rows=247,304 width=16) (actual time=81.861..81.861 rows=247,304 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 3935kB
11. 36.699 36.699 ↑ 1.0 247,304 1

Seq Scan on derived_activity_account_meeting_fact fact (cost=0.00..4,785.04 rows=247,304 width=16) (actual time=0.139..36.699 rows=247,304 loops=1)