Optimize loading of sqlite database
-
- Posts: 51
- Joined: Wed Mar 18, 2015 5:52 am
Optimize loading of sqlite database
Is there a way to optimise the loading time of an sqlite database?
Re: Optimize loading of sqlite database
To be able to help you, you need to give us more information.
-
- Posts: 51
- Joined: Wed Mar 18, 2015 5:52 am
Re: Optimize loading of sqlite database
Simply when loading my program, I create a non-persistent SQLITE database and two tables in the database. This loading takes quite a long time before launching a window and this is due to the part of the program that creates and loads the sqlite database. Hence my question is it possible to reduce this loading time?
Code: Select all
DeclareModule ouvertureDatabase
Global.l ouverture
Declare cree()
EndDeclareModule
Module ouverturedatabase
Procedure Cree()
ouverture.l = OpenDatabase(#PB_Any)
DatabaseUpdate(ouverture,"DROP TABLE IF EXISTS sepa"+";")
;
DatabaseUpdate(ouverture, "CREATE TABLE IF NOT EXISTS sepa ( NOM TEXT,BANQUE TEXT,IBAN TEXT,BIC TEXT,MONTANT TEXT,LIBELLE TEXT,DATE_EXECUTE TEXT,PURPOSE TEXT,REF_LOT TEXT,END_TO_END TEXT,INSTRID TEXT,ADRESSE TEXT,CPVILLE TEXT,SIREN TEXT);" )
EndProcedure
EndModule
Re: Optimize loading of sqlite database
Assuming this is the only piece of code you are using and I adjust your code so I can actually run it, it loads in my Edge browser instantly and I see no long launch time.
You don't really provide much info so it's difficult to guess what your problem might be.
The database stuff is all done in memory so maybe you have a small amount of RAM, maybe a slow processor, maybe a slow browser.
You don't really provide much info so it's difficult to guess what your problem might be.
The database stuff is all done in memory so maybe you have a small amount of RAM, maybe a slow processor, maybe a slow browser.
-
- Posts: 51
- Joined: Wed Mar 18, 2015 5:52 am
Re: Optimize loading of sqlite database
Here are param from my computer
Total amount of installed memory, in bytes: 8516689920
The available memory, in bytes: 4689563648
The size of the memory page, in bytes (usually 4 KB): 4096
The size of the total swap memory, in bytes (Windows and Linux only): 9858867200
The size of the available swap memory, in bytes (Windows and Linux only): 5659693056
The size of the total virtual memory, in bytes (Windows only): 2147352576
The size of the available virtual memory, in bytes (Windows only): 2056699904
Processor ntel(R) Core(TM) i5-4210U CPU @ 1.70GHz
Browser Chrome version Version 92.0.4515.159 (Build officiel) (64 bits)
Windows 10 French version
I try with the last version of Edge, it's a little bit quicker but not signficant
Total amount of installed memory, in bytes: 8516689920
The available memory, in bytes: 4689563648
The size of the memory page, in bytes (usually 4 KB): 4096
The size of the total swap memory, in bytes (Windows and Linux only): 9858867200
The size of the available swap memory, in bytes (Windows and Linux only): 5659693056
The size of the total virtual memory, in bytes (Windows only): 2147352576
The size of the available virtual memory, in bytes (Windows only): 2056699904
Processor ntel(R) Core(TM) i5-4210U CPU @ 1.70GHz
Browser Chrome version Version 92.0.4515.159 (Build officiel) (64 bits)
Windows 10 French version
I try with the last version of Edge, it's a little bit quicker but not signficant
Re: Optimize loading of sqlite database
What loading times are we talking about here? Seconds, minutes?
The example code on the subject of databases in the SB-Help (DatabasePersistent.sb) loads in under 2 seconds for me.
The example code on the subject of databases in the SB-Help (DatabasePersistent.sb) loads in under 2 seconds for me.
Re: Optimize loading of sqlite database
Maybe it's due to your CPU?
The i5-4210U is over 7 years old with a CPU benchmark of 2288.
My desktop (i7-10700K) has a CPU benchmark of 19462 so maybe that is why I see no slow downs.
Even my old laptop has a CPU benchmark of 5721 and the page loads in about 1 second.
The i5-4210U is over 7 years old with a CPU benchmark of 2288.
My desktop (i7-10700K) has a CPU benchmark of 19462 so maybe that is why I see no slow downs.
Even my old laptop has a CPU benchmark of 5721 and the page loads in about 1 second.