A computer-implemented method for access path optimization is provided according to embodiments of the present disclosure. In the method, a plurality of real values of an access path factor may be collected during a specified time period. One of the real values may be generated when a query is executed on a first access path. Then, at least one second access path may be generated for the query based on the plurality of real values of the access path factor. Moreover, an optimal access path for the query may be identified from the first access path and the at least one second access path.