I am reading the post Improve INSERT-per-second performance of SQLite? to improve the performance of my SQLite.
One question is: If I need to perform the following queries:
INSERT INTO
INSERT INTO
...
INSERT INTO(more than 10000 times)
SELECT ...
SELECT
UPDATE ...
If I want to improve the performance, should I insert "BEGIN TRANSATION" and "END TRANSATION" at the very beginning and ending of all codes, like this:
BEGIN TRANSACTION
INSERT INTO
INSERT INTO
...
INSERT INTO(more than 10000 times)
SELECT ...
SELECT
UPDATE ...
UPDATE ...
END TRANSACTION
Or should I insert BEGIN/END TRANSACTION just for the insert operation?
BEGIN TRANSACTION
INSERT INTO
INSERT INTO
...
INSERT INTO(more than 10000 times)
END TRANSACTION
SELECT ...
SELECT
UPDATE ...
UPDATE ...