explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6dpg

Settings
# exclusive inclusive rows x rows loops node
1. 343.576 31,695.899 ↑ 1.0 30 1

Limit (cost=1,548,068.12..1,548,068.20 rows=30 width=68) (actual time=31,352.322..31,695.899 rows=30 loops=1)

2. 1.707 31,352.323 ↑ 9,655.2 30 1

Sort (cost=1,548,068.12..1,548,792.26 rows=289,656 width=68) (actual time=31,352.320..31,352.323 rows=30 loops=1)

  • Sort Key: (((to_char((date(t_e20so1_document_datastore_default.c_docdate))::timestamp with time zone, 'MM/DD/YYYY'::text)))::date)
  • Sort Method: top-N heapsort Memory: 28kB
3. 0.000 31,350.616 ↑ 40.6 7,126 1

Group (cost=1,373,051.54..1,539,513.29 rows=289,656 width=68) (actual time=30,670.034..31,350.616 rows=7,126 loops=1)

  • Group Key: (to_char((date(t_e20so1_document_datastore_default.c_docdate))::timestamp with time zone, 'MM/DD/YYYY'::text))
4. 518.919 31,687.405 ↑ 35.8 32,329 1

Gather Merge (cost=1,373,051.54..1,528,651.19 rows=1,158,624 width=40) (actual time=30,670.018..31,687.405 rows=32,329 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
5. 231.625 31,168.486 ↑ 44.8 6,466 5 / 5

Group (cost=1,372,051.48..1,389,647.84 rows=289,656 width=40) (actual time=30,505.616..31,168.486 rows=6,466 loops=5)

  • Group Key: (to_char((date(t_e20so1_document_datastore_default.c_docdate))::timestamp with time zone, 'MM/DD/YYYY'::text))
6. 6,008.425 30,936.861 ↑ 1.3 2,463,157 5 / 5

Sort (cost=1,372,051.48..1,379,763.45 rows=3,084,788 width=40) (actual time=30,505.598..30,936.861 rows=2,463,157 loops=5)

  • Sort Key: (to_char((date(t_e20so1_document_datastore_default.c_docdate))::timestamp with time zone, 'MM/DD/YYYY'::text))
  • Sort Method: external merge Disk: 82640kB
  • Worker 0: Sort Method: external merge Disk: 82160kB
  • Worker 1: Sort Method: external merge Disk: 81720kB
  • Worker 2: Sort Method: external merge Disk: 80264kB
  • Worker 3: Sort Method: external merge Disk: 83080kB
7. 6,025.452 24,928.436 ↑ 1.3 2,463,157 5 / 5

Parallel Hash Join (cost=691,067.99..891,346.62 rows=3,084,788 width=40) (actual time=21,629.143..24,928.436 rows=2,463,157 loops=5)

  • Hash Cond: (temp_docin_dvhf3wtuuozuhm3ltb10twqk.c_documentid = t_e20so1_document_datastore_default.c_documentid)
8. 5,277.377 5,277.377 ↑ 1.3 3,198,260 5 / 5

Parallel Seq Scan on temp_docin_dvhf3wtuuozuhm3ltb10twqk (cost=0.00..110,736.27 rows=3,997,827 width=8) (actual time=2.382..5,277.377 rows=3,198,260 loops=5)

9. 1,178.375 13,625.607 ↓ 1.2 2,463,157 5 / 5

Parallel Hash (cost=655,319.42..655,319.42 rows=2,056,526 width=16) (actual time=13,625.606..13,625.607 rows=2,463,157 loops=5)

  • Buckets: 32768 Batches: 512 Memory Usage: 1472kB
10. 264.937 12,447.232 ↓ 1.2 2,463,157 5 / 5

Parallel Append (cost=0.00..655,319.42 rows=2,056,526 width=16) (actual time=0.798..12,447.232 rows=2,463,157 loops=5)

11. 12,182.295 12,182.295 ↓ 1.2 2,463,157 5 / 5

Parallel Seq Scan on t_e20so1_document_datastore_default (cost=0.00..645,036.79 rows=2,056,526 width=16) (actual time=0.797..12,182.295 rows=2,463,157 loops=5)

  • Filter: ((c_docdate IS NOT NULL) AND (c_datastoresid = 11))
  • Rows Removed by Filter: 735549
Planning time : 0.798 ms
Execution time : 31,709.982 ms