9. The method of claim 4 wherein the I/O cost is determined by computing an input size of data to be queried divided by a size of the data block used by the database system to read and write data.
4. The method of claim 1 wherein the cost of computing the query is the weighted sum of an estimated CPU cost and an estimated I/O cost.