Maintain stable data in a database I am doing Performance evaluation of my application. The size of database is around 20GB. I am using jMeter as a performance evaluation tool. Here each performance test (ie., Each jMeter run) there is some number of records are inserted. Here is my testing sequence.


Run jMeter and check the time taken to complete an action
Finetune the code for performance.
Re-Run the same scenario and check the timing.


For example.
 Before run :

Id      Name
1       XXXX
2       YYYY
3       ZZZZ


After Step 1, My table data look likes

Id      Name
1       XXXX
2       YYYY
3       ZZZZ
4       AAAA
5       BBBB
6       CCCC
..etc


Now I wants to revert my table like the first ie., 

Id      Name
1       XXXX
2       YYYY
3       ZZZZ


Here what my problem is the DB size is growing for each test run. 

Is there any way to maintain some benchmark (if the DB size is 20GB means, It must be maintain the size as 20GB till end of my test). Any one please guide me how to achieve my requirement.
I don't really have the possibility to try jMeter now, so I don't know how following the below advice would affect your tests.

Normally benchmarking is done so that after the tests the original database state is restored.  This is achieved by rolling back all changes.

In the case of jMeter you have to set AutoCommit to false in the JDBC configuration, then issue a ROLLBACK as the very last command in your test script.