FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SQLite browse of large tables
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
SQLite browse of large tables
Posted: Sun Feb 19, 2012 09:43 PM

Hello,

I'm using SQlite, and for browsing the data I make a query or the database that is located on the server, and store the fields I want browse, in a temporary dbf-file on the a local path.
Untill now I had no problems, but I created a testtable of 120000 records and the proces to read the data from the server into a temporary file takes a long time.
Is there a faster way to do it? I was thinking first read only 100 records, show them, and then reading the rest into the background and add them to the temporary database. Does anyone created something like that already?

Thanks,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: SQLite browse of large tables
Posted: Sat Mar 17, 2012 09:14 PM

Marc,

First I am not sure why you would need 120000 records in a temp file? Perhaps you should re-think the design.

If you are committing the writes to the temp file these commits could be eliminated. If you are use a SQLite file as the temp file then the commits take a really long time. Even if you are using a DBF removing the commits will speed it up.

Since the temp file is only going to be used by the person creating it, you don't need any commits. Well, maybe one at the very end.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 845
Joined: Sun Oct 09, 2005 05:36 PM
Re: SQLite browse of large tables
Posted: Sun Mar 18, 2012 05:22 AM

Marc,

Try using create temporary table in SQL, and charge records from an insert is faster,, i use temp table and work fine in mysql
regards
paco

____________________

Paco
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: SQLite browse of large tables
Posted: Mon Mar 19, 2012 09:59 AM

James, Francisco,

I only create a temporary DBF-file because I'm using the library http://www4.zzz.com.tw/phpbb2/viewforum.php?f=1, and this one doesn't support browsing with xbrowse.
So I first copy the data from the SQL-database to a temp-DBF file (without commits), and browse it like a normaly DBF-file.
Normaly it's no problem, but whith very large files , the copy can take a while.
I solved the problem by limiting the amount of records to browse. The client can now select this number.

Regards,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion