explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VPQ3

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 6,321.947 ↑ 1.0 2 1

Finalize GroupAggregate (cost=485,077.79..485,077.84 rows=2 width=11) (actual time=6,321.945..6,321.947 rows=2 loops=1)

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

Sort (cost=485,077.79..485,077.80 rows=4 width=15) (actual time=6,321.939..6,321.940 rows=6 loops=1)

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

Gather (cost=485,077.33..485,077.75 rows=4 width=15) (actual time=6,282.787..6,323.855 rows=6 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 44.108 5,802.355 ↑ 1.0 2 3

Partial HashAggregate (cost=484,077.33..484,077.35 rows=2 width=15) (actual time=5,802.354..5,802.355 rows=2 loops=3)

  • Group Key: p.device
5. 3,164.426 5,758.247 ↓ 1.1 121,414 3

Hash Join (cost=180,294.16..483,507.41 rows=113,984 width=7) (actual time=1,290.734..5,758.247 rows=121,414 loops=3)

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

Parallel Seq Scan on profiles p (cost=0.00..262,944.79 rows=1,874,079 width=48) (actual time=0.006..1,303.771 rows=1,495,115 loops=3)

7. 254.204 1,290.050 ↓ 1.3 364,241 3

Hash (cost=174,469.65..174,469.65 rows=273,561 width=41) (actual time=1,290.050..1,290.050 rows=364,241 loops=3)

  • Buckets: 65536 Batches: 8 Memory Usage: 3760kB
8. 900.769 1,035.846 ↓ 1.3 364,241 3

Bitmap Heap Scan on profile_site ps (cost=11,812.46..174,469.65 rows=273,561 width=41) (actual time=147.490..1,035.846 rows=364,241 loops=3)

  • Recheck Cond: (((site_id)::text = 't66js6VS0cTxNPNOP007LXzm3JK2'::text) AND (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 Index Recheck: 864889
  • Heap Blocks: exact=43855 lossy=33418
9. 135.077 135.077 ↓ 1.3 364,295 3

Bitmap Index Scan on profile_site_site_id_created_idx (cost=0.00..11,744.07 rows=273,561 width=0) (actual time=135.077..135.077 rows=364,295 loops=3)

  • Index Cond: (((site_id)::text = 't66js6VS0cTxNPNOP007LXzm3JK2'::text) AND (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))
Planning time : 0.499 ms
Execution time : 6,324.796 ms