FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Strange MariaDB save problem.
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Strange MariaDB save problem.
Posted: Sun Jun 21, 2020 08: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
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Strange MariaDB save problem.
Posted: Sun Jun 21, 2020 08: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.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Strange MariaDB save problem.
Posted: Mon Jun 22, 2020 03: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 (fw): Select all Collapse
oCn:SetAutoCommit( .f. )


After end of loop
Code (fw): Select all Collapse
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

Continue the discussion