Speed of update
Posted: 05.01.2006, 09:44
Hi.
Im trying to optimize my code somewhat. Usually when i only do an update from a SqlServer-query to an MySql-table it goes very fast. Altough this seems to differ from table to table.
if not (Locate('ACIP_ACPI_ID;ACIP_ACIPT_ID',VarArrayOf([ADOQGeneral.FieldByName('Va_Ref_Id').AsString,'1']),[])) then
Those are both integer values. When found it updates 2 fields. 3000 records takes about 4-5 seconds.
if not (Locate('ACPI_ID',ADOQGeneral.FieldByName('Va_Ref_Id').AsString,[])) then
This is string. When found it updates 6 fields. Altough with this, 1500 records takes about 40 seconds.
Anyone know what the reason could be, and what i can do to increase the preformance of the latter?
I use TZTable for the operations.
All the best
Jostein
Im trying to optimize my code somewhat. Usually when i only do an update from a SqlServer-query to an MySql-table it goes very fast. Altough this seems to differ from table to table.
if not (Locate('ACIP_ACPI_ID;ACIP_ACIPT_ID',VarArrayOf([ADOQGeneral.FieldByName('Va_Ref_Id').AsString,'1']),[])) then
Those are both integer values. When found it updates 2 fields. 3000 records takes about 4-5 seconds.
if not (Locate('ACPI_ID',ADOQGeneral.FieldByName('Va_Ref_Id').AsString,[])) then
This is string. When found it updates 6 fields. Altough with this, 1500 records takes about 40 seconds.
Anyone know what the reason could be, and what i can do to increase the preformance of the latter?
I use TZTable for the operations.
All the best
Jostein