explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Fb7V

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 1,365.955 ↑ 1.0 100 1

Limit (cost=780,765.11..780,765.36 rows=100 width=8) (actual time=1,365.934..1,365.955 rows=100 loops=1)

  • Buffers: shared hit=168959
2. 0.075 1,365.940 ↑ 1.9 100 1

Sort (cost=780,765.11..780,765.57 rows=185 width=8) (actual time=1,365.933..1,365.940 rows=100 loops=1)

  • Sort Key: site_id
  • Sort Method: quicksort Memory: 33kB
  • Buffers: shared hit=168959
3. 82.231 1,365.865 ↑ 1.1 171 1

HashAggregate (cost=780,756.29..780,758.14 rows=185 width=8) (actual time=1,365.834..1,365.865 rows=171 loops=1)

  • Group Key: site_id
  • Buffers: shared hit=168959
4. 1,228.190 1,283.634 ↑ 1.1 380,652 1

Bitmap Heap Scan on "user" (cost=16,173.25..779,676.05 rows=432,098 width=8) (actual time=69.040..1,283.634 rows=380,652 loops=1)

  • Recheck Cond: (((created >= '2020-02-18 00:00:00'::timestamp without time zone) AND (created <= '2020-02-19 00:00:00'::timestamp without time zone)) 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: 2988556
  • Filter: (site_id > 0)
  • Heap Blocks: exact=60902 lossy=102047
  • Buffers: shared hit=168959
5. 0.002 55.444 ↓ 0.0 0 1

BitmapOr (cost=16,173.25..16,173.25 rows=432,808 width=0) (actual time=55.444..55.444 rows=0 loops=1)

  • Buffers: shared hit=6010
6. 46.626 46.626 ↑ 1.0 366,834 1

Bitmap Index Scan on ix_user_created (cost=0.00..12,736.06 rows=377,950 width=0) (actual time=46.626..46.626 rows=366,834 loops=1)

  • Index Cond: ((created >= '2020-02-18 00:00:00'::timestamp without time zone) AND (created <= '2020-02-19 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=2390
7. 8.816 8.816 ↓ 1.1 61,867 1

Bitmap Index Scan on ix_user_updated (cost=0.00..3,221.14 rows=54,858 width=0) (actual time=8.816..8.816 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.150 ms
Execution time : 1,367.224 ms