explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vEv

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 74.700 ↓ 0.0 0 1

Subquery Scan on vw_zlecenia_automat (cost=4.71..29,552.99 rows=1 width=73) (actual time=74.700..74.700 rows=0 loops=1)

  • Filter: vw_zlecenia_automat.automat
  • Rows Removed by Filter: 113
2. 25.226 74.673 ↓ 113.0 113 1

Nested Loop Left Join (cost=4.71..29,552.98 rows=1 width=73) (actual time=0.751..74.673 rows=113 loops=1)

  • Filter: ((za.id_zlecenia IS NULL) OR ((za.id_zlecenia IS NOT NULL) AND (za.error_id = 6)))
  • Rows Removed by Filter: 8
3.          

Initplan (forNested Loop Left Join)

4. 0.049 0.049 ↑ 1.0 1 1

Seq Scan on setup (cost=0.00..3.86 rows=1 width=13) (actual time=0.024..0.049 rows=1 loops=1)

  • Filter: (key = 'Orders automat'::text)
  • Rows Removed by Filter: 148
5. 0.808 48.672 ↓ 121.0 121 1

Nested Loop (cost=0.41..29,540.40 rows=1 width=60) (actual time=0.369..48.672 rows=121 loops=1)

  • Join Filter: (z.idoddzialnad = zag.id_oddzial)
  • Rows Removed by Join Filter: 7321
6. 46.522 46.522 ↓ 122.0 122 1

Index Scan using idx_isprocessed4 on zlecenia z (cost=0.41..29,537.90 rows=1 width=60) (actual time=0.350..46.522 rows=122 loops=1)

  • Filter: ((idoddzialnad IS NOT NULL) AND (status = ANY ('{1,210,214}'::integer[])) AND (id_zlecenia_typ = ANY ('{2,3,4,5,6,11}'::integer[])) AND ((modifydate)::date >= (now() - '30 days'::interval)) AND (((odebracod)::date = (now())::date) OR (odebracod IS NULL)))
  • Rows Removed by Filter: 13279
7. 1.342 1.342 ↓ 1.0 61 122

Seq Scan on zlecenia_automat_godziny zag (cost=0.00..1.75 rows=60 width=4) (actual time=0.002..0.011 rows=61 loops=122)

  • Filter: (production_run AND (id_zlecenia_typ = 2))
8. 0.726 0.726 ↓ 0.0 0 121

Index Scan using id_zlecenia_idx on zlecenia_automat za (cost=0.43..8.45 rows=1 width=12) (actual time=0.006..0.006 rows=0 loops=121)

  • Index Cond: (id_zlecenia = z.id)
Planning time : 1.913 ms
Execution time : 74.998 ms