explain.depesz.com

PostgreSQL's explain analyze made readable

Result: adpB

Settings
# exclusive inclusive rows x rows loops node
1. 2.028 42,109.983 ↑ 1.0 1 1

Aggregate (cost=1,967,422.65..1,967,422.66 rows=1 width=8) (actual time=42,109.983..42,109.983 rows=1 loops=1)

2. 64.797 42,107.955 ↑ 14.5 23,516 1

Hash Right Join (cost=1,952,129.93..1,966,571.82 rows=340,334 width=0) (actual time=32,681.404..42,107.955 rows=23,516 loops=1)

  • Hash Cond: (vozv.delo_id = decis.delo_id)
  • Filter: ((court_decis.delo_id IS NOT NULL) OR (vozv.delo_id IS NOT NULL))
  • Rows Removed by Filter: 199,040
3. 9,719.611 9,719.611 ↓ 8.5 16,325 1

Index Scan using decis_ispoln_kod_dat on decis_ispoln vozv (cost=0.56..9,555.05 rows=1,922 width=6) (actual time=356.917..9,719.611 rows=16,325 loops=1)

  • Index Cond: (stad_ispoln_kod = '46'::numeric)
  • Filter: ((create_time <= (('now'::cstring)::date - '1 day'::interval)) AND (create_time >= date_trunc('year'::text, (('now'::cstring)::date)::timestamp with time zone)))
  • Rows Removed by Filter: 864
4. 85.036 32,323.547 ↑ 1.5 222,544 1

Hash (cost=1,946,213.19..1,946,213.19 rows=340,334 width=12) (actual time=32,323.547..32,323.547 rows=222,544 loops=1)

  • Buckets: 262,144 Batches: 4 Memory Usage: 4,200kB
5. 0.000 32,238.511 ↑ 1.5 222,544 1

Gather (cost=1,000.56..1,946,213.19 rows=340,334 width=12) (actual time=2.255..32,238.511 rows=222,544 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
6. 41.530 32,261.079 ↑ 1.8 31,792 7 / 7

Nested Loop Left Join (cost=0.56..1,911,179.79 rows=56,722 width=12) (actual time=3.335..32,261.079 rows=31,792 loops=7)

7. 15,847.405 15,847.405 ↑ 1.8 31,791 7 / 7

Parallel Seq Scan on decis (cost=0.00..1,598,373.25 rows=56,722 width=6) (actual time=2.030..15,847.405 rows=31,791 loops=7)

  • Filter: (((ogai_sost_kod)::text = '45597'::text) AND (decis_kod = '95'::numeric) AND (decis_dat <= (('now'::cstring)::date - '1 day'::interval)) AND (decis_dat >= date_trunc('year'::text, (('now'::cstring)::date - '3 years'::interval))))
  • Rows Removed by Filter: 2,827,293
8. 16,372.144 16,372.144 ↓ 0.0 0 222,534 / 7

Index Scan using decis_delo_id on decis court_decis (cost=0.56..5.50 rows=1 width=6) (actual time=0.515..0.515 rows=0 loops=222,534)

  • Index Cond: (decis.delo_id = delo_id)
  • Filter: ((organ_sost_kod IS NULL) AND (create_time <= (('now'::cstring)::date - '1 day'::interval)) AND (create_time >= date_trunc('year'::text, (('now'::cstring)::date)::timestamp with time zone)))
  • Rows Removed by Filter: 2
Planning time : 2.959 ms
Execution time : 42,110.181 ms