1. A method for performing a cost-based optimization of authorization checks in a database system, the method comprising: receiving a query at the database system; estimating a cost for executing the query, which involves estimating a cost for evaluating authorization checks, which involve functional evaluations of access rights for data accessed by the query; rewriting the query to including evaluating authorization checks within the query; estimating a cost for executing the rewritten query; determining if executing the rewritten query has a lower cost than executing the query and performing the authorization checks; if so, executing the rewritten query; and if not, executing the query.