There are several database tables involved in the transactions. And cleaning them will probably be easiest from inside the database.
Please be advised that running commands like the one I'm going to add below is very dangerous. I advise leaving it to someone who knows databases. At the least you should backup the database first.
with that said, the sequence database queries would be something like:
Truncate Table branchtransfers;
Truncate Table issues;
Truncate Table old_issues;
Truncate Table reserves;
Truncate Table old_reserves;
Truncate Table tmp_holdsqueue;
Truncate Table accountoffsets;
Truncate Table accountlines;
Truncate Table statistics;