explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3tLg

Settings
# exclusive inclusive rows x rows loops node
1. 35.758 36,297.018 ↑ 2,396.7 6 1

GroupAggregate (cost=419,563.94..421,720.94 rows=14,380 width=124) (actual time=36,263.821..36,297.018 rows=6 loops=1)

  • Group Key: ((post.dat_sost)::date)
2. 434.784 36,261.260 ↓ 2.5 35,657 1

Sort (cost=419,563.94..419,599.89 rows=14,380 width=97) (actual time=36,257.996..36,261.260 rows=35,657 loops=1)

  • Sort Key: ((post.dat_sost)::date)
  • Sort Method: quicksort Memory: 6,185kB
3. 45.198 35,826.476 ↓ 2.5 35,657 1

Nested Loop Left Join (cost=122,180.19..418,570.87 rows=14,380 width=97) (actual time=4,623.903..35,826.476 rows=35,657 loops=1)

4. 27.082 33,499.230 ↓ 2.5 35,657 1

Nested Loop Left Join (cost=122,179.63..377,173.94 rows=14,380 width=91) (actual time=4,622.254..33,499.230 rows=35,657 loops=1)

5. 31.976 27,838.342 ↓ 2.5 35,657 1

Nested Loop Left Join (cost=122,179.07..236,880.64 rows=14,380 width=71) (actual time=4,621.728..27,838.342 rows=35,657 loops=1)

6. 335.198 23,242.270 ↓ 2.5 35,657 1

Hash Left Join (cost=122,178.51..212,659.20 rows=14,380 width=47) (actual time=4,614.543..23,242.270 rows=35,657 loops=1)

  • Hash Cond: (post.delo_id = s.delo_id)
7. 26.343 18,309.415 ↓ 2.5 35,657 1

Nested Loop (cost=1.14..83,562.12 rows=14,380 width=45) (actual time=4.479..18,309.415 rows=35,657 loops=1)

8. 9,332.663 9,332.663 ↓ 1.8 35,659 1

Index Scan using docs_post_sost on docs_post post (cost=0.57..26,185.48 rows=19,702 width=45) (actual time=3.460..9,332.663 rows=35,659 loops=1)

  • Index Cond: ((public.trunc(dat_sost) >= (('now'::cstring)::date - '7 days'::interval)) AND (public.trunc(dat_sost) <= ('now'::cstring)::date) AND ((ogai_sost_kod)::text = '45597'::text))
  • Filter: (doc_n IS NOT NULL)
  • Rows Removed by Filter: 3,441
9. 8,950.409 8,950.409 ↑ 1.0 1 35,659

Index Scan using decis_docs_post_id on decis (cost=0.56..2.90 rows=1 width=6) (actual time=0.250..0.251 rows=1 loops=35,659)

  • Index Cond: (docs_post_id = post.docs_id)
  • Filter: (decis_kod = ANY ('{4,65}'::numeric[]))
  • Rows Removed by Filter: 0
10. 297.018 4,597.657 ↓ 1.1 1,195,494 1

Hash (cost=103,338.29..103,338.29 rows=1,083,767 width=14) (actual time=4,597.657..4,597.657 rows=1,195,494 loops=1)

  • Buckets: 262,144 Batches: 16 Memory Usage: 5,470kB
11. 120.363 4,300.639 ↓ 1.1 1,195,494 1

Nested Loop (cost=0.56..103,338.29 rows=1,083,767 width=14) (actual time=1.931..4,300.639 rows=1,195,494 loops=1)

12. 32.501 32.501 ↑ 1.4 3,305 1

Seq Scan on reg_registry reg (cost=0.00..1,612.11 rows=4,659 width=14) (actual time=0.012..32.501 rows=3,305 loops=1)

  • Filter: ((reg_type = ANY ('{4,10}'::integer[])) AND ((ogai_kod)::text = '45597'::text))
  • Rows Removed by Filter: 5,820
13. 4,147.775 4,147.775 ↑ 1.1 362 3,305

Index Only Scan using ind_reg_sending_reg_delo_id on reg_sending s (cost=0.56..17.68 rows=415 width=12) (actual time=0.196..1.255 rows=362 loops=3,305)

  • Index Cond: (reg_id = reg.id)
  • Heap Fetches: 65,918
14. 4,564.096 4,564.096 ↑ 1.0 1 35,657

Index Only Scan using apr_decis_postn_b on decis gibdd_v (cost=0.56..1.67 rows=1 width=24) (actual time=0.128..0.128 rows=1 loops=35,657)

  • Index Cond: (post_n = (post.doc_n)::text)
  • Heap Fetches: 18,692
15. 5,633.806 5,633.806 ↑ 4.0 1 35,657

Index Scan using rnip_icharges_supp_bill_id_index on rnip_icharges rnip (cost=0.56..9.72 rows=4 width=45) (actual time=0.156..0.158 rows=1 loops=35,657)

  • Index Cond: ((supp_bill_id)::text = (post.doc_n)::text)
  • Filter: ((change_status_meaning = 1) AND (process_status = ANY ('{-1,-2,-3,-4,-9,2,5,6}'::integer[])))
  • Rows Removed by Filter: 0
16. 2,282.048 2,282.048 ↑ 1.0 1 35,657

Index Scan using docs_signature_docs_id_category on docs_signature sign (cost=0.56..2.87 rows=1 width=14) (actual time=0.064..0.064 rows=1 loops=35,657)

  • Index Cond: ((post.docs_id = card_id) AND (card_category = '7'::numeric))
Planning time : 2.403 ms
Execution time : 36,297.232 ms