1. An apparatus for generating an optimal access path to data for a query being performed by a computer system to retrieve data from a database stored in a data storage device coupled to the computer system, the apparatus comprising: (a) a computer system having a data storage device coupled thereto, the data storage device storing data in a database; and (b) a relational database management system performed by the computer system, the relational database management system configured for: generating a plurality of access paths for the query; determining an uncertainty for the query, wherein the uncertainty is the difference between selectivity assumptions about the costs for each of the access paths; determining a sensitivity of the query to the uncertainty, wherein the sensitivity is the difference between the costs of the access paths for the selectivity assumptions; and selecting one of the access paths according to the uncertainty and the sensitivity; wherein the selectivity assumptions comprise normal, pessimistic or optimistic selectivity assumptions, the uncertainty is the difference between the normal, pessimistic or optimistic selectivity assumptions about the costs for each of the access paths, and the sensitivity is the difference between the costs of the access paths for the normal, pessimistic or optimistic selectivity assumptions.