Re: [sqlite] sqlite - Delete large table in sqlite

2016-09-09 Thread Венцислав Русев
On 09/09/2016 12:49 PM, Bhavesh Patel wrote: I have a 4GB SQLite database (currently using SQLCipher for encryption). I have created a physical table in the SQLite DB which has approx 20 rows x 183 columns. When I am trying to delete the table. Sqlite is taking up a lot of time to delete

[sqlite] how is "pragma threads = 4" working

2016-09-16 Thread Венцислав Русев
My computer has 4 cores. I have compile sqlite like this "gcc -DSQLITE_MAX_WORKER_THREADS=4 -DSQLITE_DEFAULT_WORKER_THREADS=4 shell.c sqlite3.c -lpthread -ldl -o sqlite3". I made some tests and found that "pragma threads = 4" doesn't decrease runtime of the query that sorts 1 milion records.

Re: [sqlite] how is "pragma threads = 4" working

2016-09-17 Thread Венцислав Русев
On 08/15/2016 12:02 AM, Венцислав Русев wrote: My computer has 4 cores. I have compile sqlite like this "gcc -DSQLITE_MAX_WORKER_THREADS=4 -DSQLITE_DEFAULT_WORKER_THREADS=4 shell.c sqlite3.c -lpthread -ldl -o sqlite3". I made some tests and found that "pragma threads = 4&qu

[sqlite] Can I increase the performance of sqlite3_exec() or maybe change it to prepare+step?

2017-06-12 Thread Венцислав Русев
Hello, I am using sqlite C API to migrate a database. Migration consists of many SQL statements that are known in advance. To migrate a DB from version 3 to version 7 the C program does the following: 1. disable foreign_keys (PRAGMA foreign_keys = OFF); 2. open transaction (BEGIN

Re: [sqlite] Can I increase the performance of sqlite3_exec() or maybe change it to prepare+step?

2017-06-13 Thread Венцислав Русев
Thank you for your advice Simon and Keith. We strive to make the migration process faster, because our technicians are responsible of changing the program version of each embedded device and then migrating its database, not the end user. I'm creating the indexes last as you said, but