explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w6Vq

Settings
# exclusive inclusive rows x rows loops node
1. 29.355 36,520.205 ↑ 30,811.0 3 1

GroupAggregate (cost=377,972.54..387,529.50 rows=92,433 width=70) (actual time=36,501.621..36,520.205 rows=3 loops=1)

  • Group Key: (date_part('month'::text, e.dat_sost)), e.ogai_sost_kod
2. 25.872 36,490.850 ↑ 2.1 71,876 1

Sort (cost=377,972.54..378,341.18 rows=147,455 width=43) (actual time=36,485.936..36,490.850 rows=71,876 loops=1)

  • Sort Key: (date_part('month'::text, e.dat_sost))
  • Sort Method: quicksort Memory: 7,506kB
3. 28.560 36,464.978 ↑ 2.1 71,876 1

Merge Left Join (cost=267,439.30..362,591.99 rows=147,455 width=43) (actual time=19,794.024..36,464.978 rows=71,876 loops=1)

  • Merge Cond: (e.docs_id = r.docs_id)
4. 118.827 35,969.334 ↑ 2.1 71,829 1

Merge Left Join (cost=248,656.44..343,029.18 rows=147,455 width=36) (actual time=19,329.248..35,969.334 rows=71,829 loops=1)

  • Merge Cond: (e.docs_id = s.card_id)
5. 90.314 19,196.924 ↑ 2.1 71,300 1

Sort (cost=248,655.88..249,024.51 rows=147,455 width=30) (actual time=19,175.225..19,196.924 rows=71,300 loops=1)

  • Sort Key: e.docs_id
  • Sort Method: quicksort Memory: 7,461kB
6. 9,374.150 19,106.610 ↑ 2.1 71,300 1

Bitmap Heap Scan on docs_executive e (cost=76,170.84..235,996.93 rows=147,455 width=30) (actual time=9,747.667..19,106.610 rows=71,300 loops=1)

  • Recheck Cond: ((dat_sost >= date_trunc('month'::text, (('now'::cstring)::date - '2 mons'::interval))) AND ((ogai_sost_kod)::text = '45592'::text))
  • Rows Removed by Index Recheck: 379,297
  • Heap Blocks: exact=51,053 lossy=101,592
7. 38.989 9,732.460 ↓ 0.0 0 1

BitmapAnd (cost=76,170.84..76,170.84 rows=147,455 width=0) (actual time=9,732.460..9,732.460 rows=0 loops=1)

8. 2,171.520 2,171.520 ↓ 1.2 333,770 1

Bitmap Index Scan on docs_executive_dat_sost (cost=0.00..5,148.81 rows=279,889 width=0) (actual time=2,171.520..2,171.520 rows=333,770 loops=1)

  • Index Cond: (dat_sost >= date_trunc('month'::text, (('now'::cstring)::date - '2 mons'::interval)))
9. 7,521.951 7,521.951 ↓ 1.0 2,361,022 1

Bitmap Index Scan on docs_executive_status_id_kod (cost=0.00..70,948.05 rows=2,314,697 width=0) (actual time=7,521.951..7,521.951 rows=2,361,022 loops=1)

  • Index Cond: ((ogai_sost_kod)::text = '45592'::text)
10. 16,653.583 16,653.583 ↓ 1.4 696,481 1

Index Only Scan using docs_signature_docs_id_category on docs_signature s (cost=0.56..248,913.63 rows=503,408 width=6) (actual time=154.012..16,653.583 rows=696,481 loops=1)

  • Index Cond: (card_category = '18'::numeric)
  • Heap Fetches: 34,921
11. 5.240 467.084 ↑ 1.1 7,579 1

Sort (cost=18,782.86..18,802.88 rows=8,007 width=11) (actual time=464.764..467.084 rows=7,579 loops=1)

  • Sort Key: r.docs_id
  • Sort Method: quicksort Memory: 547kB
12. 1.199 461.844 ↑ 1.1 7,563 1

Gather (cost=1,000.00..18,263.72 rows=8,007 width=11) (actual time=2.010..461.844 rows=7,563 loops=1)

  • Workers Planned: 3
  • Workers Launched: 0
13. 460.645 460.645 ↓ 2.9 7,563 1

Parallel Seq Scan on docs_executive_response r (cost=0.00..16,463.02 rows=2,583 width=11) (actual time=1.703..460.645 rows=7,563 loops=1)

  • Filter: (fssp_status = '15'::numeric)
  • Rows Removed by Filter: 991,886
Planning time : 0.874 ms
Execution time : 36,523.602 ms