explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hYJJ

Settings
# exclusive inclusive rows x rows loops node
1. 496.000 5,277.140 ↑ 1.1 167,041 1

GroupAggregate (cost=750,715.83..756,944.08 rows=177,909 width=108) (actual time=4,637.018..5,277.140 rows=167,041 loops=1)

  • Group Key: (to_char(date_trunc('month'::text, ""timestamp""), 'YYYY-MM-DD'::text)), team, user_id, company, query
2. 2,507.005 4,781.140 ↓ 2.6 464,982 1

Sort (cost=750,715.83..751,160.78 rows=177,981 width=92) (actual time=4,636.974..4,781.140 rows=464,982 loops=1)

  • Sort Key: (to_char(date_trunc('month'::text, ""timestamp""), 'YYYY-MM-DD'::text)), team, user_id, company, query
  • Sort Method: quicksort Memory: 77539kB
3. 142.223 2,274.135 ↓ 2.6 464,982 1

Gather (cost=1,000.00..735,194.67 rows=177,981 width=92) (actual time=0.370..2,274.135 rows=464,982 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 2,131.912 2,131.912 ↓ 2.1 154,994 3

Parallel Seq Scan on server (cost=0.00..715,877.46 rows=74,159 width=92) (actual time=0.064..2,131.912 rows=154,994 loops=3)

  • Filter: ((team <> 'A Team'::text) AND (""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 ('{user1,user2,user3,user4,user5}'::text[])))
  • Rows Removed by Filter: 655499