On Mon, 19 Jan 2015 13:30:24 -0500
Andy Jewell wrote:
> I have a single threaded application, which at its heart is
>
> while (true) {
> open a database // any one of thousands, so I can’t just keep
> it open do a select
> close the database
> }
>
> With that part unchanged, does anyone have any optimization
> suggestions? I am compiling the amalgamation myself, so I’m open to
> both compile time and run time options. I don’t need to worry about
> other processes updating the database. I’m not looking for SQL advice
> at this time.
If your application is single threaded, you can move the open/close out of
while(true). You say that you can't keep it open, because you work with
thousands databases, but you can keep them open with different db pointer
structure (sqlite3 *), there's no limit to that. There's a limit (30/62) if you
try to attach a database to another db already open.
> Openning the database with SQLITE_OPEN_READONLY was an enourmous
> help. Explicitly turning off threading didn’t seem to help much.
> Changing my compiler optimization level from -O2 to -O3 (gcc 4.4)
> made it larger but no faster.
>
>
> many thanks,
> adj
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
--- ---
Eduardo Morras
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users