explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 44fW

Settings
# exclusive inclusive rows x rows loops node
1. 69.640 111,435.474 ↑ 3.6 20,607 1

Nested Loop Left Join (cost=204,610.75..853,215.77 rows=73,971 width=1,900) (actual time=83,590.480..111,435.474 rows=20,607 loops=1)

  • Filter: ((court_decis.delo_id IS NOT NULL) OR (vozv.delo_id IS NOT NULL))
  • Rows Removed by Filter: 37,558
2. 55.408 83,681.674 ↑ 1.3 58,160 1

Merge Left Join (cost=204,610.18..205,041.02 rows=73,971 width=1,780) (actual time=83,584.734..83,681.674 rows=58,160 loops=1)

  • Merge Cond: (decis.delo_id = vozv.delo_id)
3. 129.562 77,861.921 ↑ 1.3 58,152 1

Sort (cost=191,164.52..191,349.45 rows=73,971 width=12) (actual time=77,833.146..77,861.921 rows=58,152 loops=1)

  • Sort Key: decis.delo_id
  • Sort Method: quicksort Memory: 4,262kB
4. 77,732.359 77,732.359 ↑ 1.3 58,152 1

Index Scan using decis_det_ogai_kod on decis (cost=0.58..185,182.24 rows=73,971 width=12) (actual time=382.135..77,732.359 rows=58,152 loops=1)

  • Index Cond: ((decis_dat >= date_trunc('year'::text, (('now'::cstring)::date)::timestamp with time zone)) AND (decis_dat <= (('now'::cstring)::date - '1 day'::interval)) AND ((ogai_sost_kod)::text = '45597'::text) AND (decis_kod = '95'::numeric))
5. 3.655 5,764.345 ↓ 2.1 16,169 1

Materialize (cost=13,445.66..13,485.09 rows=7,886 width=1,768) (actual time=5,751.578..5,764.345 rows=16,169 loops=1)

6. 36.164 5,760.690 ↓ 2.1 16,169 1

Sort (cost=13,445.66..13,465.37 rows=7,886 width=1,768) (actual time=5,751.572..5,760.690 rows=16,169 loops=1)

  • Sort Key: vozv.delo_id
  • Sort Method: quicksort Memory: 6,691kB
7. 5,724.526 5,724.526 ↓ 2.1 16,169 1

Index Scan using decis_ispoln_kod_dat on decis_ispoln vozv (cost=0.56..9,310.64 rows=7,886 width=1,768) (actual time=67.177..5,724.526 rows=16,169 loops=1)

  • Index Cond: (stad_ispoln_kod = '46'::numeric)
8. 27,684.160 27,684.160 ↓ 0.0 0 58,160

Index Scan using decis_delo_id on decis court_decis (cost=0.56..8.75 rows=1 width=115) (actual time=0.377..0.476 rows=0 loops=58,160)

  • Index Cond: (decis.delo_id = delo_id)
  • Filter: (organ_sost_kod IS NULL)
  • Rows Removed by Filter: 1
Planning time : 151.483 ms
Execution time : 111,442.169 ms