explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4DNQ

Settings
# exclusive inclusive rows x rows loops node
1. 510.043 3,709.022 ↑ 1.1 167,072 1

GroupAggregate (cost=426,781.25..432,960.41 rows=176,507 width=108) (actual time=3,057.242..3,709.022 rows=167,072 loops=1)

  • Group Key: (to_char(date_trunc('month'::text, ""timestamp""), 'YYYY-MM-DD'::text)), team, user_id, company, query
  • Buffers: shared hit=160409
2. 2,374.003 3,198.979 ↓ 2.6 465,039 1

Sort (cost=426,781.25..427,222.69 rows=176,578 width=92) (actual time=3,057.211..3,198.979 rows=465,039 loops=1)

  • Sort Key: (to_char(date_trunc('month'::text, ""timestamp""), 'YYYY-MM-DD'::text)), team, user_id, company, query
  • Sort Method: quicksort Memory: 77547kB
  • Buffers: shared hit=160409
3. 771.249 824.976 ↓ 2.6 465,039 1

Bitmap Heap Scan on server (cost=3,754.35..411,392.52 rows=176,578 width=92) (actual time=88.067..824.976 rows=465,039 loops=1)

  • Recheck Cond: ((""timestamp"" >= '2018-01-01 00:00:00'::timestamp without time zone) AND (""timestamp"" <= '2019-03-01 00:00:00'::timestamp without time zone) AND (user_id <> ALL ('{u1,u2,u3,u4,u5}'::text[])) AND (team <> 'A Team'::text))
  • Heap Blocks: exact=159135
  • Buffers: shared hit=160409
4. 53.727 53.727 ↓ 2.6 465,039 1

Bitmap Index Scan on meep (cost=0.00..3,710.20 rows=176,578 width=0) (actual time=53.727..53.727 rows=465,039 loops=1)

  • Index Cond: ((""timestamp"" >= '2018-01-01 00:00:00'::timestamp without time zone) AND (""timestamp"" <= '2019-03-01 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=1274