explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eAXo

Settings
# exclusive inclusive rows x rows loops node
1. 13.082 2,030.518 ↑ 72.3 1,201 1

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

  • Group Key: (to_char((invoice_summary.summary)::timestamp with time zone, 'yyyy-mm'::text)), invoice_summary.server, invoice_summary.brand_id, invoice_summary.platform_id
2. 131.782 2,017.436 ↑ 12.3 7,245 1

Gather Merge (cost=1,586,274.35..1,597,689.95 rows=88,788 width=145) (actual time=1,972.912..2,017.436 rows=7,245 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
3. 36.846 1,885.654 ↑ 14.0 906 8 / 8

Partial GroupAggregate (cost=1,585,274.23..1,585,813.30 rows=12,684 width=145) (actual time=1,844.679..1,885.654 rows=906 loops=8)

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

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

  • Sort Key: (to_char((invoice_summary.summary)::timestamp with time zone, 'yyyy-mm'::text)), invoice_summary.server, invoice_summary.brand_id, invoice_summary.platform_id
  • Sort Method: external merge Disk: 3976kB
5. 1,744.055 1,744.055 ↓ 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=432.904..1,744.055 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: 2161401
Planning time : 0.624 ms
Execution time : 2,032.867 ms