A method of retrieving data from a multi-tenant database system having a relational data store and a non-relational data store, the method comprising: receiving a request at a host system for the multi-tenant database system, the request specifying data to be retrieved from the multi-tenant database system; retrieving, based on the request via the host system, one or more locations of the data to be retrieved; generating, at the host system, a database query based on the request, wherein the database query specifies a plurality of data elements to be retrieved, the plurality of data elements including one or more data elements residing within the non-relational data store and one or more other data elements residing within the relational data store; and executing the database query against the multi-tenant database system to retrieve the data; wherein the database query specifies a join operation; and wherein the join operation comprises a plurality of sub-queries (306...309) which are generated based on query optimizations available via an optimizer agent of the host system, the query optimizations comprising one of: a replication order from the relational data store to the non-relational data store; a specified ordering for the plurality of sub-queries; a target data store for execution of a corresponding sub-query; one or more pre-query assessments based on the data to be retrieved; an in-memory join operation specifying at least one or more of the plurality of data elements to be retrieved from each of the relational data store and the non-relational data store and placed into memory accessible to the optimizer agent and a corresponding sub-query to retrieve the at least one or more of the plurality of data elements from the memory accessible to the optimizer agent in fulfillment of the request. receiving a request at a host system for the multi-tenant database system, the request specifying data to be retrieved from the multi-tenant database system; retrieving, based on the request via the host system, one or more locations of the data to be retrieved; generating, at the host system, a database query based on the request, wherein the database query specifies a plurality of data elements to be retrieved, the plurality of data elements including one or more data elements residing within the non-relational data store and one or more other data elements residing within the relational data store; and executing the database query against the multi-tenant database system to retrieve the data; wherein the database query specifies a join operation; and wherein the join operation comprises a plurality of sub-queries (306...309) which are generated based on query optimizations available via an optimizer agent of the host system, the query optimizations comprising one of: a replication order from the relational data store to the non-relational data store; a specified ordering for the plurality of sub-queries; a target data store for execution of a corresponding sub-query; one or more pre-query assessments based on the data to be retrieved; an in-memory join operation specifying at least one or more of the plurality of data elements to be retrieved from each of the relational data store and the non-relational data store and placed into memory accessible to the optimizer agent and a corresponding sub-query to retrieve the at least one or more of the plurality of data elements from the memory accessible to the optimizer agent in fulfillment of the request. a replication order from the relational data store to the non-relational data store; a specified ordering for the plurality of sub-queries; a target data store for execution of a corresponding sub-query; one or more pre-query assessments based on the data to be retrieved; an in-memory join operation specifying at least one or more of the plurality of data elements to be retrieved from each of the relational data store and the non-relational data store and placed into memory accessible to the optimizer agent and a corresponding sub-query to retrieve the at least one or more of the plurality of data elements from the memory accessible to the optimizer agent in fulfillment of the request.