explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GDgW

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

Group (cost=2,125.87..2,125.88 rows=1 width=48) (actual rows= loops=)

  • Group Key: a.classe, a.magazzino
2. 0.000 0.000 ↓ 0.0

Sort (cost=2,125.87..2,125.87 rows=1 width=48) (actual rows= loops=)

  • Sort Key: a.classe, a.magazzino
3. 0.000 0.000 ↓ 0.0

Subquery Scan on a (cost=2,125.85..2,125.86 rows=1 width=48) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Sort (cost=2,125.85..2,125.85 rows=1 width=59) (actual rows= loops=)

  • Sort Key: snartico.classe, sncoils.magazzino
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=41.13..2,125.84 rows=1 width=59) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on snartico (cost=21.15..1,940.93 rows=7 width=25) (actual rows= loops=)

  • Recheck Cond: (tipologia = ANY ('{001,008}'::bpchar[]))
  • Filter: (categoria_articolo_acq((articolo)::text) = 4)
7. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on snarticoidx2 (cost=0.00..21.15 rows=1,307 width=0) (actual rows= loops=)

  • Index Cond: (tipologia = ANY ('{001,008}'::bpchar[]))
8. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on sncoils (cost=19.98..23.99 rows=1 width=39) (actual rows= loops=)

  • Recheck Cond: ((articolo = snartico.articolo) AND ((coi_data_utilizzo IS NULL) OR (coi_data_utilizzo > '12-06-2019'::date)))
  • Filter: ((coi_data <= '12-06-2019'::date) AND (sede = 'AL'::bpchar))
9. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=19.98..19.98 rows=1 width=0) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on sncoilsidx6 (cost=0.00..4.36 rows=21 width=0) (actual rows= loops=)

  • Index Cond: (articolo = snartico.articolo)
11. 0.000 0.000 ↓ 0.0

BitmapOr (cost=15.37..15.37 rows=698 width=0) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on sncoilsidx2 (cost=0.00..10.73 rows=698 width=0) (actual rows= loops=)

  • Index Cond: (coi_data_utilizzo IS NULL)
13. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on sncoilsidx2 (cost=0.00..4.29 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (coi_data_utilizzo > '12-06-2019'::date)
14.          

SubPlan (forNested Loop)

15. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.30..8.30 rows=1 width=8) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Only Scan using snmovmagazzinoidx1 on snmovmagazzino (cost=0.29..8.30 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((coi_numero = sncoils.coi_numero) AND (sede = sncoils.sede))
17. 0.000 0.000 ↓ 0.0

Limit (cost=4.30..4.31 rows=1 width=8) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Aggregate (cost=4.30..4.31 rows=1 width=8) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Index Scan using snmovmagazzinoidx5 on snmovmagazzino snmovmagazzino_1 (cost=0.29..4.30 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (mmg_data_movimento > '12-06-2019'::date)
  • Filter: ((coi_numero = sncoils.coi_numero) AND (sede = sncoils.sede))
20. 0.000 0.000 ↓ 0.0

Limit (cost=4.31..4.31 rows=1 width=19) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Sort (cost=4.31..4.31 rows=1 width=19) (actual rows= loops=)

  • Sort Key: snmovmagazzino_2.mmg_data_movimento, snmovmagazzino_2.mmg_numero
22. 0.000 0.000 ↓ 0.0

Index Scan using snmovmagazzinoidx5 on snmovmagazzino snmovmagazzino_2 (cost=0.29..4.30 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (mmg_data_movimento > '12-06-2019'::date)
  • Filter: ((coi_numero = sncoils.coi_numero) AND (sede = sncoils.sede))