1. A method implemented on a computer for querying data residing in a base table, comprising: receiving a query; receiving an indexed view for a functional invocation over the data, the functional invocation comprising a table valued function; applying the indexed view as an index to the functional invocation over the data; and determining a query result using the index to the functional invocation over the data.