explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kRDo

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

Limit (cost=0.27..267.12 rows=10 width=1,026) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.27..15,949,739.40 rows=597,712 width=1,026) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.00..15,932,826.73 rows=36,158 width=984) (actual rows= loops=)

  • Join Filter: ((st.company_id = aux.company_id) AND (st.article_code = aux.article_code))
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.00..3,693.69 rows=36,158 width=982) (actual rows= loops=)

  • Join Filter: ((fam.company_id = aux.company_id) AND (fam.family_code = aux.family_id))
5. 0.000 0.000 ↓ 0.0

Seq Scan on articles_aux aux (cost=0.00..3,059.34 rows=36,158 width=890) (actual rows= loops=)

  • Filter: (company_id = 1)
6. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.59 rows=1 width=92) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on families fam (cost=0.00..1.59 rows=1 width=92) (actual rows= loops=)

  • Filter: (company_id = 1)
8. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..602.63 rows=25,173 width=10) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on stocks_aux st (cost=0.00..476.76 rows=25,173 width=10) (actual rows= loops=)

  • Filter: (company_id = 1)
10. 0.000 0.000 ↓ 0.0

Index Scan using subfamilies_code_company_id_idx on subfamilies subf (cost=0.27..0.41 rows=6 width=42) (actual rows= loops=)

  • Index Cond: ((company_id = aux.company_id) AND (company_id = 1) AND (subfamily_code = aux.subfamily_id))