1. A computer program product, comprising a non-transitory computer usable medium having a computer readable program code embodied therein, the computer readable program code adapted to be executed to implement a method of improving a query in a database, the method comprising: storing, in a database, tenant specific data for each of at least two tenants; storing contextual information for each of the at least two tenants, the contextual information describing a characteristic of the tenant specific data stored for each of the at least two tenants, and the contextual information including permissions to perform a specific operation for each of the at least two tenants; receiving a query directed to the database; determining an improved query based at least in part upon the received query and the stored contextual information for a particular one of the at least two tenants to which the query is addressed, such that the improved query is customized for the tenant specific data specific to the particular one of the at least two tenants to which the query is addressed; and providing, in place of the query, the improved query.