explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RK16

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=32,118.90..32,118.91 rows=1 width=288) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=32,118.90..32,118.91 rows=1 width=288) (actual rows= loops=)

  • Sort Key: so_reportings_rows.sernr DESC NULLS LAST, so_reportings_rows.id
3. 0.000 0.000 ↓ 0.0

Subquery Scan on so_reportings_rows (cost=32,118.88..32,118.89 rows=1 width=288) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Sort (cost=32,118.88..32,118.88 rows=1 width=324) (actual rows= loops=)

  • Sort Key: so_reservings.sernr, sr.rowno
5. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=32,118.82..32,118.87 rows=1 width=324) (actual rows= loops=)

  • Group Key: so_reservings.id, h.part_no, h.part_desc, h.batch, h.prod_type, a.class, r.qty_pa, p.from_warehouse, sr.rowno, h.start_date, h.prod_comment, h.finished
6. 0.000 0.000 ↓ 0.0

Sort (cost=32,118.82..32,118.82 rows=1 width=294) (actual rows= loops=)

  • Sort Key: so_reservings.id, h.part_no, h.part_desc, h.batch, h.prod_type, a.class, r.qty_pa, p.from_warehouse, sr.rowno, h.start_date, h.prod_comment, h.finished
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18,387.03..32,118.81 rows=1 width=294) (actual rows= loops=)

  • Join Filter: ((NOT (sr.alt_code IS DISTINCT FROM so_reservings.alt_code)) AND (sr.component_part = so_reservings.comp_part))
8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18,386.75..32,118.03 rows=1 width=292) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18,386.46..32,110.39 rows=1 width=290) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18,386.33..32,110.23 rows=1 width=258) (actual rows= loops=)

  • Join Filter: ((r_1.sernr = so_reservings.sernr) AND (r_1.comp_part = so_reservings.comp_part))
11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.70..3,761.72 rows=1 width=226) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.29..3,753.28 rows=1 width=221) (actual rows= loops=)

  • Filter: (h.finished IS NULL)
13. 0.000 0.000 ↓ 0.0

Seq Scan on so_reservings (cost=0.00..3,657.51 rows=12 width=164) (actual rows= loops=)

  • Filter: (((sernr)::character varying)::text ~~* '%420203483%'::text)
14. 0.000 0.000 ↓ 0.0

Index Scan using so_header_pkey on so_header h (cost=0.29..7.97 rows=1 width=61) (actual rows= loops=)

  • Index Cond: (sernr = so_reservings.sernr)
15. 0.000 0.000 ↓ 0.0

Index Scan using so_rows_pkey on so_rows r (cost=0.42..8.44 rows=1 width=9) (actual rows= loops=)

  • Index Cond: (id = so_reservings.so_rows_id)
16. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=18,385.63..27,741.46 rows=24,282 width=72) (actual rows= loops=)

  • Group Key: r_1.sernr, r_1.comp_part, r_1.alt_code, r_1.batch, r_1.fin_warehouse, r_1.location, r_1.so_rows_id
17. 0.000 0.000 ↓ 0.0

Sort (cost=18,385.63..18,710.19 rows=129,827 width=45) (actual rows= loops=)

  • Sort Key: r_1.sernr, r_1.comp_part, r_1.alt_code, r_1.batch, r_1.fin_warehouse, r_1.location, r_1.so_rows_id
18. 0.000 0.000 ↓ 0.0

Seq Scan on so_reportings r_1 (cost=0.00..3,362.27 rows=129,827 width=45) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Index Scan using production_types_code_uidx on production_types p (cost=0.13..0.15 rows=1 width=64) (actual rows= loops=)

  • Index Cond: (code = (h.prod_type)::text)
20. 0.000 0.000 ↓ 0.0

Index Scan using articles_code_idx on articles a (cost=0.29..7.64 rows=1 width=9) (actual rows= loops=)

  • Index Cond: (code = so_reservings.comp_part)