1. A computer implemented method, comprising: creating a materialized query table from a base table without applying one or more fine-grained access control rules associated with the base table when obtaining data from the base table; associating a rule with the materialized query table, wherein no data is returned from the materialized query table when there are no fine-grained access control rules associated directly with the materialized query table; in response to receiving a direct access request to the materialized query table in a first query referencing the materialized query table, providing access to the data in the materialized query table by applying a union of the rule and one or more additional fine-grained access control rules associated directly with the materialized query table to the data in the materialized query table before returning the data; and in response to receiving an internal query rewrite request for a second query that uses the base table, rewriting the second query to reflect the one or more additional fine-grained access control rules associated with the base table to form a third query; rewriting the third query to make use of the materialized query table to form a fourth query; and executing the fourth query without applying the union of the rule and the one or more additional fine-grained access control rules associated directly with the materialized query table.
1. A computer implemented method, comprising: creating a materialized query table from a base table without applying one or more fine-grained access control rules associated with the base table when obtaining data from the base table; associating a rule with the materialized query table, wherein no data is returned from the materialized query table when there are no fine-grained access control rules associated directly with the materialized query table; in response to receiving a direct access request to the materialized query table in a first query referencing the materialized query table, providing access to the data in the materialized query table by applying a union of the rule and one or more additional fine-grained access control rules associated directly with the materialized query table to the data in the materialized query table before returning the data; and in response to receiving an internal query rewrite request for a second query that uses the base table, rewriting the second query to reflect the one or more additional fine-grained access control rules associated with the base table to form a third query; rewriting the third query to make use of the materialized query table to form a fourth query; and executing the fourth query without applying the union of the rule and the one or more additional fine-grained access control rules associated directly with the materialized query table. 4. The method of claim 1 , further comprising: performing materialized query table matching to determine whether to make use of the materialized query table.