explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bopC

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 14,108.854 ↑ 1.0 1 1

Aggregate (cost=379,804.94..379,804.95 rows=1 width=8) (actual time=14,108.854..14,108.854 rows=1 loops=1)

2.          

CTE a

3. 0.001 14,108.851 ↓ 0.0 0 1

HashAggregate (cost=379,802.70..379,803.39 rows=69 width=33) (actual time=14,108.851..14,108.851 rows=0 loops=1)

4.          

CTE l

5. 0.000 0.016 ↓ 0.0 0 1

Nested Loop (cost=86.85..8,839.90 rows=2,816 width=18) (actual time=0.016..0.016 rows=0 loops=1)

6.          

CTE o

7. 0.001 0.015 ↓ 0.0 0 1

Nested Loop (cost=0.56..16.60 rows=1 width=9) (actual time=0.015..0.015 rows=0 loops=1)

8. 0.014 0.014 ↓ 0.0 0 1

Index Only Scan using ix_produbi_codice on produbi (cost=0.28..8.29 rows=1 width=4) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: (codice = 24643)
  • Heap Fetches: 0
9. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_prodord_codprod on prodord (cost=0.28..8.29 rows=1 width=13) (never executed)

  • Index Cond: (codprod = 24643)
10. 0.016 0.016 ↓ 0.0 0 1

CTE Scan on o (cost=0.00..0.02 rows=1 width=43) (actual time=0.016..0.016 rows=0 loops=1)

11. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on lottim (cost=70.25..8,795.12 rows=2,816 width=27) (never executed)

  • Recheck Cond: ((procord)::text = (o.codop)::text)
12. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ix_lottim_procord (cost=0.00..69.55 rows=2,816 width=0) (never executed)

  • Index Cond: ((procord)::text = (o.codop)::text)
13. 0.004 14,108.850 ↓ 0.0 0 1

Merge Join (cost=362,037.87..370,616.15 rows=69,329 width=33) (actual time=14,108.850..14,108.850 rows=0 loops=1)

  • Merge Cond: ((m.codlot)::text = (l.codice)::text)
14. 12,390.933 14,108.817 ↑ 1,507,670.0 1 1

Sort (cost=361,820.20..365,589.37 rows=1,507,670 width=23) (actual time=14,108.817..14,108.817 rows=1 loops=1)

  • Sort Key: m.codlot
  • Sort Method: external merge Disk: 54728kB
15. 1,717.884 1,717.884 ↓ 1.0 1,513,197 1

Seq Scan on movimag m (cost=0.00..145,258.94 rows=1,507,670 width=23) (actual time=0.017..1,717.884 rows=1,513,197 loops=1)

  • Filter: ((codcau)::text = 'PREL'::text)
  • Rows Removed by Filter: 2910403
16. 0.011 0.029 ↓ 0.0 0 1

Sort (cost=217.67..224.71 rows=2,816 width=25) (actual time=0.029..0.029 rows=0 loops=1)

  • Sort Key: l.codice
  • Sort Method: quicksort Memory: 25kB
17. 0.018 0.018 ↓ 0.0 0 1

CTE Scan on l (cost=0.00..56.32 rows=2,816 width=25) (actual time=0.018..0.018 rows=0 loops=1)

18. 14,108.853 14,108.853 ↓ 0.0 0 1

CTE Scan on a (cost=0.00..1.38 rows=69 width=8) (actual time=14,108.853..14,108.853 rows=0 loops=1)

Total runtime : 14,120.172 ms