Query optimization techniques are proved to be essential for high performance of database management systems. In the paper of new querying paradigms, such as similarity based search, exact query evaluation is neither computationally feasible nor meaningful, and approximate query evaluation is the only reasonable option. In this paper, a problem of resource allocation for approximate evaluation of complex queries is considered. An approximate algorithm for a near-optimal resource allocation is presented, providing the best feasible quality of the output subject to a limited total cost of a query. The results of experiments have shown that the approximate resource allocation algorithm is accurate and efficient.