>
> Multithreaded mode allows SQLite to be accessed via multiple threads as long
> as threads don't shared connection handles.  This is the what's sometimes
> called the apartment model of multithreading.

Thank you very much for your quick reply.

Is there a way to enable multi-thread mode from command line? Before
changing the source code of my program, I would like to see the effect
of multi-threading from command line. More specifically, I have two
scripts:

#!/bin/bash
for arg in $*
do
    echo "Handling " $arg
    sqlite3  esp.DB "SELECT COUNT(*) FROM table_$arg;"
done

and

#!/bin/bash
for arg in $*
do
    echo "Handling " $arg
    sqlite3  esp.DB "SELECT COUNT(*) FROM table_$arg;" &
done
wait

Using three tables (e.g. test.sh 111 112 113), the first command takes
13m3s, the second command takes 12m45s. I am wondering if there is any
magic to make the second script finish in 5 minutes by executing the
query in parallel ...

Bo
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to