Conexión a BD MySql remota

HMG en Español

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2061
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Conexión a BD MySql remota

Post by AUGE_OHR »

hi,
edufloriv wrote: Sat Sep 21, 2019 2:04 pm My question now is the following, what would be the minimum bandwidth requirement that I must request for my clients to work optimally with a remote connection to HOST? - Note when I upload my first table that writing 1,700 records takes almost 4 minutes and I have a 60mbps fiber optic connection.
have a look at your Network Monitor ... i guess it is less 10%

i guess you use

Code: Select all

INSERT INTO ...
and send Query for each record :?:

your App is not sending so much Data when send "one-by-one"
you can use ";" and send more that one "INSERT INTO ..." as 1 x Query

Code: Select all

   aStruc := DBSTRUC()
   iMax := LEN(aStruc)
   cPre := "INSERT INTO "
   cQuery := ""
   nCount := 0
   
   DO WHILE !EOF()
        cQuery += cPre
        // for each Record field
        FOR i := 1 TO iMax
               cQuery += ...
        NEXT
        cQuery +=  CRLF

        nCount ++
        IF nCount = nMax
            oPG:Exec(cQuery)           
            // reset
            cQuery := ""
            nCount := 0
        ELSE
            cQuery +=  ";" + CRLF
        ENDIF
 
        SKIP
   ENDDO

   IF !EMPTY(cQuery)
       oPG:Exec(cQuery)           
   ENDIF
you have to find out how many "INSERT INTO ..." can used with 1 x Query.
it depend how many Field you have in DBF

Code: Select all

   IF LEN(cQuery) < nSendSize
have fun
Jimmy
Post Reply