Add transaction for the operation of insert. Only insert is acceptable, nor update or delete.
It will cost less time than non-transaction(it will cost 1/1000 time) when you want to insert a amount of rows.
e.g.
commit a transaction:
begin;
insert into Tbl values(11, 22, 33);
commit;
rollback a transaction:
begin;
insert into Tbl values(11, 22, 33);
rollback;