Bueno, he estado haciendo algunas pruebas y no he detectado lentitud en ningún caso, ni la primera vez... ni ninguna
Código:
Select a.ARTICULO,a.DESCRIPCION,
(Select Sum (b.ENTRADAS - b.SALIDAS)
from HISTORICO b
where b.ARTICULO = a.ARTICULO) as Stock
From ARTICULOS a
WHERE ARTICULO > 0 // <-- es un campo varchar(20), pon: where a.articulo<>'0'
Cita:
|
Empezado por flamerobin
Executing...
Done.
32637 fetches, 0 marks, 0 reads, 0 writes.
0 inserts, 0 updates, 0 deletes, 13962 index, 936 seq.
Delta memory: -8748 bytes.
Total execution time: 0,207s
Script execution finished.
|