Sqlite3 Optimization:
    1) Insert the elements in a batch;
    2) Use the sqlite3_prepare/sqlite3_step instead of excuting
       every sqilte3 command seperatly.

And definitly, it speeds up now.