explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HaHy

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 6,641.250 ↑ 1.0 2 1

Finalize GroupAggregate (cost=494,599.34..494,599.39 rows=2 width=11) (actual time=6,641.249..6,641.250 rows=2 loops=1)

  • Group Key: p.device
2. 0.000 6,641.244 ↓ 1.5 6 1

Sort (cost=494,599.34..494,599.35 rows=4 width=15) (actual time=6,641.243..6,641.244 rows=6 loops=1)

  • Sort Key: p.device
  • Sort Method: quicksort Memory: 25kB
3. 445.194 6,641.308 ↓ 1.5 6 1

Gather (cost=494,598.88..494,599.30 rows=4 width=15) (actual time=6,641.210..6,641.308 rows=6 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 36.232 6,196.114 ↑ 1.0 2 3

Partial HashAggregate (cost=493,598.88..493,598.90 rows=2 width=15) (actual time=6,196.113..6,196.114 rows=2 loops=3)

  • Group Key: p.device
5. 3,030.924 6,159.882 ↓ 1.1 121,382 3

Hash Join (cost=189,954.50..493,043.91 rows=110,993 width=7) (actual time=1,893.064..6,159.882 rows=121,382 loops=3)

  • Hash Cond: ((p.id)::text = (ps.id)::text)
6. 1,236.613 1,236.613 ↑ 1.3 1,495,057 3

Parallel Seq Scan on profiles p (cost=0.00..262,890.96 rows=1,873,696 width=48) (actual time=0.007..1,236.613 rows=1,495,057 loops=3)

7. 240.691 1,892.345 ↓ 1.4 364,146 3

Hash (cost=184,282.70..184,282.70 rows=266,384 width=41) (actual time=1,892.345..1,892.345 rows=364,146 loops=3)

  • Buckets: 65536 Batches: 8 Memory Usage: 3759kB
8. 1,506.624 1,651.654 ↓ 1.4 364,146 3

Bitmap Heap Scan on profile_site ps (cost=19,925.72..184,282.70 rows=266,384 width=41) (actual time=161.998..1,651.654 rows=364,146 loops=3)

  • Recheck Cond: ((site_id)::text = 't66js6VS0cTxNPNOP007LXzm3JK2'::text)
  • Rows Removed by Index Recheck: 1706545
  • Filter: ((created_at >= '2019-10-30 03:00:00'::timestamp without time zone) AND (created_at <= '2019-11-30 02:59:59.999'::timestamp without time zone))
  • Rows Removed by Filter: 236579
  • Heap Blocks: exact=51482 lossy=66061
9. 145.030 145.030 ↓ 1.0 600,813 3

Bitmap Index Scan on profile_site_site_id_idx (cost=0.00..19,859.12 rows=595,542 width=0) (actual time=145.030..145.030 rows=600,813 loops=3)

  • Index Cond: ((site_id)::text = 't66js6VS0cTxNPNOP007LXzm3JK2'::text)
Planning time : 0.403 ms
Execution time : 6,642.548 ms