Ver Mensaje Individual
  #1  
Antiguo 11-01-2011
tec tec is offline
Miembro
 
Registrado: dic 2009
Posts: 37
Reputación: 0
tec Va por buen camino
Maestro/Detalle muy lento ADSL

En una base de datos firebird 2.5 me tarda mucho en hacer un maestro/detalle, tal era que lo cambié por otra forma, pero todavía es lento
cuando se accede a la base de datos por Ip (ADSL 6 MB).

Tengo 2 TSimpleDataSet conectados cada uno a un dbgrid.

TaulaC.Add('SELECT * FROM albaran where empresa='+emp);
TaulaC.Add('AND ALB_CLI='+clieTic);
TaulaC.Add('Order by ALB_FEC');

En el evento albaranAfterScroll(DataSet: TDataSet)

TaulaCl.DataSet.CommandText:='SELECT * FROM lineas WHERE LIN_CLAVE='+QuotedStr(TaulaC.FieldByName('ALB_CLAVE').AsString)+
' AND EMPRESA='+emp_act+' order by LIN_NUM';

Las 2 tablas tienen indices correctos.

Alguién sabe como puedo arreglar este problema ?

Un saludo.
Responder Con Cita