explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hGej

Settings
# exclusive inclusive rows x rows loops node
1. 23.782 2,129.799 ↑ 72.3 1,201 1

Finalize GroupAggregate (cost=1,586,274.35..1,602,514.16 rows=86,817 width=145) (actual time=2,037.666..2,129.799 rows=1,201 loops=1)

  • Group Key: (to_char((summary)::timestamp with time zone, 'yyyy-mm'::text)), server, brand_id, platform_id
2. 76.558 2,106.017 ↑ 12.1 7,356 1

Gather Merge (cost=1,586,274.35..1,597,689.95 rows=88,788 width=145) (actual time=2,037.467..2,106.017 rows=7,356 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
3. 40.295 2,029.459 ↑ 13.8 920 8 / 8

Partial GroupAggregate (cost=1,585,274.23..1,585,813.30 rows=12,684 width=145) (actual time=1,984.613..2,029.459 rows=920 loops=8)

  • Group Key: (to_char((summary)::timestamp with time zone, 'yyyy-mm'::text)), server, brand_id, platform_id
4. 97.443 1,989.164 ↓ 3.8 48,415 8 / 8

Sort (cost=1,585,274.23..1,585,305.94 rows=12,684 width=88) (actual time=1,984.564..1,989.164 rows=48,415 loops=8)

  • Sort Key: (to_char((summary)::timestamp with time zone, 'yyyy-mm'::text)), server, brand_id, platform_id
  • Sort Method: quicksort Memory: 7,621kB
5. 1,891.721 1,891.721 ↓ 3.8 48,415 8 / 8

Parallel Seq Scan on invoice_summary (cost=0.00..1,584,409.77 rows=12,684 width=88) (actual time=596.335..1,891.721 rows=48,415 loops=8)

  • Filter: ((date_trunc('MONTH'::text, (summary)::timestamp with time zone) = '2020-02-01 00:00:00+05:30'::timestamp with time zone) AND ((server)::text = ANY ('{DENMARK,DENMARK1,DENMARK2,TAIWAN,TAIWAN1,GIB,GIB1,BAHAMAS}'::text[])))
  • Rows Removed by Filter: 2,161,401
Planning time : 0.457 ms
Execution time : 2,157.351 ms