explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MKZn

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 1,084.393 ↑ 1.0 100 1

Limit (cost=760,409.12..760,409.37 rows=100 width=8) (actual time=1,084.379..1,084.393 rows=100 loops=1)

  • Buffers: shared hit=167203
2. 0.042 1,084.382 ↑ 1.9 100 1

Sort (cost=760,409.12..760,409.58 rows=185 width=8) (actual time=1,084.377..1,084.382 rows=100 loops=1)

  • Sort Key: site_id
  • Sort Method: quicksort Memory: 33kB
  • Buffers: shared hit=167203
3. 82.430 1,084.340 ↑ 1.1 171 1

HashAggregate (cost=760,400.30..760,402.15 rows=185 width=8) (actual time=1,084.321..1,084.340 rows=171 loops=1)

  • Group Key: site_id
  • Buffers: shared hit=167203
4. 946.907 1,001.910 ↑ 1.1 380,652 1

Bitmap Heap Scan on "user" (cost=11,638.01..759,366.43 rows=413,549 width=8) (actual time=67.292..1,001.910 rows=380,652 loops=1)

  • Recheck Cond: (((id >= 20273520) AND (id <= 20665298)) OR ((updated >= '2020-02-18 00:00:00'::timestamp without time zone) AND (updated <= '2020-02-19 00:00:00'::timestamp without time zone)))
  • Rows Removed by Index Recheck: 2988540
  • Filter: (site_id > 0)
  • Heap Blocks: exact=60356 lossy=102045
  • Buffers: shared hit=167203
5. 0.002 55.003 ↓ 0.0 0 1

BitmapOr (cost=11,638.01..11,638.01 rows=414,224 width=0) (actual time=55.003..55.003 rows=0 loops=1)

  • Buffers: shared hit=4802
6. 46.038 46.038 ↑ 1.0 359,058 1

Bitmap Index Scan on user_pkey (cost=0.00..8,210.09 rows=359,365 width=0) (actual time=46.038..46.038 rows=359,058 loops=1)

  • Index Cond: ((id >= 20273520) AND (id <= 20665298))
  • Buffers: shared hit=1182
7. 8.963 8.963 ↓ 1.1 61,867 1

Bitmap Index Scan on ix_user_updated (cost=0.00..3,221.15 rows=54,859 width=0) (actual time=8.963..8.963 rows=61,867 loops=1)

  • Index Cond: ((updated >= '2020-02-18 00:00:00'::timestamp without time zone) AND (updated <= '2020-02-19 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=3620
Planning time : 0.165 ms
Execution time : 1,085.211 ms