Strange MariaDB save problem.

User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Strange MariaDB save problem.

Post by vilian »

Do you have a index for field IC_NO on table icbelge ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Re: Strange MariaDB save problem.

Post by Horizon »

vilian wrote:Do you have a index for field IC_NO on table icbelge ?

Yes you are right. I forgot the index when I transferred from dbf to test many times.

Thanks.
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Strange MariaDB save problem.

Post by nageswaragunupudi »

1) Please make sure every table has a single column primary key.
2) Fields you use in WHERE clause need to be either primary key or indexed fields.

3) Also use this statement before starting your loop:

Code: Select all

oCn:SetAutoCommit( .f. )
 
After end of loop

Code: Select all

oCn:SetAutoCommit( .t. )
 
4) Such large export of data should be attempted on local server.

5) Increase max_allowed_packetsize suitably and concatenate more than one update statement with ";" so that the total size of the combined sql does not exceed 80% of the max_allowed_packetsize. Then execute multiple query at a time instead of executing each update query separately.
Regards

G. N. Rao.
Hyderabad, India
Post Reply