explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vsUW

Settings
# exclusive inclusive rows x rows loops node
1. 0.300 15,376.500 ↓ 70.0 70 1

Sort (cost=582,314.40..582,314.41 rows=1 width=1,549) (actual time=15,376.492..15,376.500 rows=70 loops=1)

  • Sort Key: printqueue.printqueueid
  • Sort Method: quicksort Memory: 174kB
2. 473.778 15,376.200 ↓ 70.0 70 1

Nested Loop (cost=716.57..582,314.39 rows=1 width=1,549) (actual time=14,926.979..15,376.200 rows=70 loops=1)

3. 0.053 14,898.992 ↓ 70.0 70 1

Nested Loop (cost=716.56..582,305.90 rows=1 width=1,542) (actual time=14,892.692..14,898.992 rows=70 loops=1)

4. 0.177 14,896.069 ↓ 70.0 70 1

Nested Loop (cost=716.56..582,304.50 rows=1 width=1,539) (actual time=14,892.627..14,896.069 rows=70 loops=1)

5. 2,885.201 14,895.542 ↓ 70.0 70 1

Hash Join (cost=716.56..582,304.22 rows=1 width=1,539) (actual time=14,892.592..14,895.542 rows=70 loops=1)

  • Hash Cond: ((printqueue.job_reference)::integer = adeshead.adesheadid)
6. 11,997.694 11,997.694 ↓ 1.0 14,799,856 1

Seq Scan on printqueue (cost=0.00..490,010.91 rows=14,652,278 width=24) (actual time=0.046..11,997.694 rows=14,799,856 loops=1)

  • Filter: ((job_type = 1) AND ((printed_time)::date <> '1899-12-30'::date) AND (COALESCE(btrim(printed_printer), ''::text) <> ''::text))
  • Rows Removed by Filter: 64
7. 0.293 12.647 ↓ 70.0 70 1

Hash (cost=716.55..716.55 rows=1 width=1,531) (actual time=12.647..12.647 rows=70 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 108kB
8. 0.261 12.354 ↓ 70.0 70 1

Nested Loop (cost=0.00..716.55 rows=1 width=1,531) (actual time=2.670..12.354 rows=70 loops=1)

9. 0.693 0.693 ↓ 2.2 120 1

Index Scan using print_log_pkey on print_log (cost=0.00..18.35 rows=55 width=1,392) (actual time=0.041..0.693 rows=120 loops=1)

  • Index Cond: (log_id > 15623536::bigint)
10. 9.960 11.400 ↑ 1.0 1 120

Index Scan using adeshead_pkey on adeshead (cost=0.00..12.68 rows=1 width=139) (actual time=0.081..0.095 rows=1 loops=120)

  • Index Cond: (adesheadid = print_log.adesheadid)
  • Filter: (print_manager.fn_get_route_code((COALESCE((SubPlan 3), ''::character varying))::text, (delivery)::text) ~ '^DPS'::text)
  • Rows Removed by Filter: 0
11.          

SubPlan (forIndex Scan)

12. 1.440 1.440 ↓ 0.0 0 120

Index Scan using sldelivery_pkey on sldelivery (cost=0.00..5.28 rows=1 width=1) (actual time=0.012..0.012 rows=0 loops=120)

  • Index Cond: (sldeliveryid = adeshead.sldeliveryid)
13. 0.350 0.350 ↑ 1.0 1 70

Index Scan using companyaddress_idx1 on companyaddress (cost=0.00..0.27 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=70)

  • Index Cond: (company = adeshead.company)
14. 2.870 2.870 ↑ 1.0 1 70

Index Scan using customer_pkey on customer (cost=0.00..1.39 rows=1 width=11) (actual time=0.028..0.041 rows=1 loops=70)

  • Index Cond: (customerid = adeshead.del_customerid)
15. 0.770 0.770 ↑ 1.0 1 70

Index Scan using sysuser_idx1 on sysuser (cost=0.00..0.29 rows=1 width=17) (actual time=0.010..0.011 rows=1 loops=70)

  • Index Cond: (usernum = CASE WHEN (adeshead.user_created = 0) THEN printqueue.req_usernum ELSE (adeshead.user_created)::integer END)
16.          

SubPlan (forNested Loop)

17. 0.070 1.540 ↑ 1.0 1 70

Limit (cost=0.00..2.38 rows=1 width=4) (actual time=0.022..0.022 rows=1 loops=70)

18. 1.470 1.470 ↑ 131.0 1 70

Index Scan using adesdet_idx3 on adesdet (cost=0.00..311.62 rows=131 width=4) (actual time=0.021..0.021 rows=1 loops=70)

  • Index Cond: (adesheadid = adeshead.adesheadid)
  • Filter: (((COALESCE(depot, ''::character varying))::text <> ''::text) AND ((layout_section)::text = 'D'::text))
  • Rows Removed by Filter: 2
19. 1.120 1.120 ↓ 0.0 0 70

Index Scan using sldelivery_pkey on sldelivery (cost=0.00..5.28 rows=1 width=1) (actual time=0.016..0.016 rows=0 loops=70)

  • Index Cond: (sldeliveryid = adeshead.sldeliveryid)