> Ora devo valutare la velocita su 600000 elementi!!
>
>
> Giulia
Sembra estremamente inefficiente , per adesso la soluzione di crearmi due tabelle in memoria
con la colonna n esplicitata e gią con le clause yyyy applicate
SET @rn=0;
CREATE TEMPORARY TABLE IF NOT EXISTS
t (INDEX(rn))
ENGINE = memory
AS ( select f_n,@rn:=@rn+1 AS rn FROM xxxx where yyyy )
CREATE TEMPORARY TABLE IF NOT EXISTS
t2 (INDEX(rn))
ENGINE = memory
AS ( select f_n,@rn:=@rn+1 AS rn FROM xxxx where yyyy )
select t2.f_n,Valore from t,t2 where t.rn = t2.rn-1;
e' a confronto praticamente istantanea...