explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jA2Q

Settings
# exclusive inclusive rows x rows loops node
1. 58.085 519,517.918 ↑ 28,919.0 3 1

GroupAggregate (cost=1,414,722.14..1,423,558.01 rows=86,757 width=70) (actual time=519,453.036..519,517.918 rows=3 loops=1)

  • Group Key: (date_part('month'::text, e.dat_sost)), e.ogai_sost_kod
2. 646.536 519,459.833 ↓ 1.6 212,374 1

Sort (cost=1,414,722.14..1,415,053.23 rows=132,434 width=43) (actual time=519,437.002..519,459.833 rows=212,374 loops=1)

  • Sort Key: (date_part('month'::text, e.dat_sost))
  • Sort Method: external merge Disk: 9,568kB
3. 102.453 518,813.297 ↓ 1.6 212,374 1

Gather (cost=1,000.99..1,401,010.98 rows=132,434 width=43) (actual time=8.757..518,813.297 rows=212,374 loops=1)

  • Workers Planned: 6
  • Workers Launched: 0
4. 490.771 518,710.844 ↓ 9.6 212,374 1

Nested Loop Left Join (cost=0.99..1,386,491.67 rows=22,072 width=43) (actual time=8.207..518,710.844 rows=212,374 loops=1)

5. 483.844 497,852.713 ↓ 9.6 212,160 1

Nested Loop Left Join (cost=0.56..1,371,542.16 rows=22,072 width=36) (actual time=7.080..497,852.713 rows=212,160 loops=1)

6. 22,554.789 22,554.789 ↓ 9.6 212,160 1

Parallel Seq Scan on docs_executive e (cost=0.00..1,126,322.68 rows=22,072 width=36) (actual time=4.839..22,554.789 rows=212,160 loops=1)

  • Filter: (((ogai_sost_kod)::text = '45597'::text) AND (dat_sost >= date_trunc('month'::text, (('now'::cstring)::date - '2 mons'::interval))))
  • Rows Removed by Filter: 4,221,626
7. 474,814.080 474,814.080 ↑ 5.0 1 212,160

Index Scan using decis_ispoln_delo_id on decis_ispoln di (cost=0.56..11.06 rows=5 width=6) (actual time=0.513..2.238 rows=1 loops=212,160)

  • Index Cond: (e.delo_id = delo_id)
  • Filter: (stad_ispoln_kod = '5'::numeric)
  • Rows Removed by Filter: 4
8. 20,367.360 20,367.360 ↓ 0.0 0 212,160

Index Scan using docs_executive_response_idx1 on docs_executive_response r (cost=0.42..0.66 rows=1 width=11) (actual time=0.096..0.096 rows=0 loops=212,160)

  • Index Cond: (docs_id = e.docs_id)
  • Filter: (fssp_status = '15'::numeric)
  • Rows Removed by Filter: 1
Planning time : 7.820 ms
Execution time : 519,522.399 ms