1. A method of generating a transactions prediction model using a computer for optimizing a plurality of transactions associated with a database system, the method comprising: causing the computer to capture a database workload, wherein the database workload includes a plurality of statements corresponding with the transactions over a specified period of time, wherein each of the plurality of statements includes at least one variable parameter; causing the computer to generate a plurality of first generalized statements from the plurality of statements by replacing the at least one variable parameter with a constant value; causing the computer to generate a plurality of second generalized statements, wherein if two or more of the plurality of first generalized statements are the same grouping the two or more of the plurality of first generalized statements to correspond with the plurality of second generalized statements; causing the computer to create a plurality of transactions classes, wherein each of the plurality of transaction classes includes at least one of the plurality of first generalized statements, and wherein each of the plurality of transaction classes represents a common sequence of transactions; causing the computer to identify a plurality of possible sequences between the plurality of transaction classes, wherein the plurality of transaction classes correspond with the database workload; and causing the computer to calculate a probability of the possible sequences between the plurality of transaction classes to generate the transactions prediction model.