Strange MariaDB save problem.

Re: Strange MariaDB save problem.

Postby vilian » Sun Jun 21, 2020 8:03 pm

Do you have a index for field IC_NO on table icbelge ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Strange MariaDB save problem.

Postby Horizon » Sun Jun 21, 2020 8:29 pm

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 & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Strange MariaDB save problem.

Postby nageswaragunupudi » Mon Jun 22, 2020 3:39 am

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  Expand view

oCn:SetAutoCommit( .f. )
 


After end of loop
Code: Select all  Expand view

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
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi, RSalazarU and 82 guests