|
| [WM] - How to insert data in SQLite from a remote MySQL |
| Iniciado por guest, 25,mar. 2016 15:35 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 25,marzo 2016 - 15:35 |
Hello,
I am using php4WM library to fetch data from remote MySQL server. This part is working fine.
But when I have to insert the data retrieved from MySQL server to local SQLite database, things are becoming very slow and this process is taking very long time.
Is there any way to insert the data retrieved from server in a faster manner in SQLite?
TIA
Yogi Yang |
| |
| |
| | | |
|
| | |
| |
| Publicado el 25,marzo 2016 - 15:59 |
Yogi Yang,
I had the same problem. WM is wrapping each individual HAdd() in a transaction. to avoid that use SQLTransaction(sqlStart), do ALL HAdd() you need and then a SQLTransaction(sqlCommit).
Speed will be much much better. But in my case still too slow (5000+ records).
In the end I switch t a completely different approach by calling a WB-webpage which does al the work an generates the sqlite-db for me. With modern processing speed of server this speeds thing up by a factor 10. Then the androdi device makes a download of the generated database. I even ZIP the final database which improves the transfer with an extra 30% or so. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 28,marzo 2016 - 08:10 |
Hello Arie,
Thanks for the tip.
You last idea is a good one...
If trying the Transaction things does not work then I will try that as the last resort.
TIA
Yogi Yang |
| |
| |
| | | |
|
| | | | |
| | |
|