1. A method for compiling a stored procedure in a database, the method comprising: invoking the stored procedure, the stored procedure comprising one or more statements; substituting run-time values for one or more variables in the statements; and creating an access plan for the statements having the substituted run-time values.