explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cukX : prod_poslije_prod_5

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 447,118.520 ↓ 0.0 0 1

Subquery Scan on v (cost=282,534.44..282,534.50 rows=1 width=818) (actual time=447,118.520..447,118.520 rows=0 loops=1)

2. 0.003 447,118.518 ↓ 0.0 0 1

GroupAggregate (cost=282,534.44..282,534.49 rows=1 width=882) (actual time=447,118.518..447,118.518 rows=0 loops=1)

  • Group Key: sr.srservicetype_code, (date_trunc('day'::text, sr.created)), sr.refferedgroup, sr.srtype_code, sr.srarea_code, sr.srsubarea_code, rsr.name, rl.name, rs.name, ra.name, rsa.name
3. 0.064 447,118.515 ↓ 0.0 0 1

Sort (cost=282,534.44..282,534.45 rows=1 width=882) (actual time=447,118.515..447,118.515 rows=0 loops=1)

  • Sort Key: sr.srservicetype_code, (date_trunc('day'::text, sr.created)), sr.refferedgroup, sr.srtype_code, sr.srarea_code, sr.srsubarea_code, rsr.name, rl.name, rs.name, ra.name, rsa.name
  • Sort Method: quicksort Memory: 25kB
4. 0.002 447,118.451 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.50..282,534.43 rows=1 width=882) (actual time=447,118.451..447,118.451 rows=0 loops=1)

  • Join Filter: ((sr.srsubarea_code)::text = (rsa.code)::text)
5. 0.013 447,118.449 ↓ 0.0 0 1

Nested Loop (cost=1.50..282,529.47 rows=1 width=868) (actual time=447,118.449..447,118.449 rows=0 loops=1)

  • Join Filter: ((sr.srservicetype_code)::text = (rsr.code)::text)
6. 0.017 0.017 ↓ 3.0 3 1

Seq Scan on r_srservicetype rsr (cost=0.00..1.04 rows=1 width=336) (actual time=0.013..0.017 rows=3 loops=1)

  • Filter: ((status)::text = 'Active'::text)
7. 0.174 447,118.419 ↓ 0.0 0 3

Nested Loop (cost=1.50..282,528.40 rows=2 width=610) (actual time=149,039.473..149,039.473 rows=0 loops=3)

  • Join Filter: ((sr.srarea_code)::text = (ra.code)::text)
8. 0.105 0.105 ↓ 20.0 20 3

Seq Scan on r_srarea ra (cost=0.00..1.25 rows=1 width=336) (actual time=0.005..0.035 rows=20 loops=3)

  • Filter: ((status)::text = 'Active'::text)
9. 2.640 447,118.140 ↓ 0.0 0 60

Nested Loop (cost=1.50..282,526.53 rows=50 width=352) (actual time=7,451.969..7,451.969 rows=0 loops=60)

  • Join Filter: ((sr.refferedgroup)::text = (rl.code)::text)
10. 3.060 3.060 ↓ 6.0 6 60

Index Scan using reference_lookup_u01 on r_reference_lookup rl (cost=0.28..8.30 rows=1 width=21) (actual time=0.018..0.051 rows=6 loops=60)

  • Index Cond: (((table_name)::text = 'SRSERVICEREQUEST'::text) AND ((column_name)::text = 'REFFEREDGROUP'::text))
  • Filter: ((status)::text = 'Active'::text)
11. 0.720 447,112.440 ↓ 0.0 0 360

Hash Join (cost=1.22..281,964.49 rows=44,299 width=338) (actual time=1,241.979..1,241.979 rows=0 loops=360)

  • Hash Cond: ((sr.srtype_code)::text = (rs.code)::text)
12. 447,111.720 447,111.720 ↓ 0.0 0 360

Seq Scan on srservicerequest sr (cost=0.00..279,493.60 rows=753,085 width=80) (actual time=1,241.977..1,241.977 rows=0 loops=360)

  • Filter: (((srservicetype_code)::text <> ''::text) AND ((srservicetype_code)::text = ANY ('{CUSTOMER_TICKET,INTERNAL_TICKET}'::text[])) AND (date_trunc('day'::text, date_trunc('day'::text, created)) > (now(
  • Rows Removed by Filter: 2,441,851
13. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.21..1.21 rows=1 width=336) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Seq Scan on r_srtype rs (cost=0.00..1.21 rows=1 width=336) (never executed)

  • Filter: ((status)::text = 'Active'::text)
15. 0.000 0.000 ↓ 0.0 0

Seq Scan on r_srsubarea rsa (cost=0.00..3.49 rows=118 width=27) (never executed)

  • Filter: ((status)::text = 'Active'::text)
Planning time : 3.910 ms
Execution time : 447,119.351 ms