1. A multi-tenant database system, comprising: a processor coupled to a memory; a customer relationship management database having one or more data tables, wherein one or more of the data tables describe a customer and a purchase order; a statistics generating module configured to generate tenant-level statistics for one or more tenants for the one or more data tables; a query optimization module, configured to optimize a database query based on the tenant-level statistics; an application server configured to execute customer relationship management software applications, wherein the application server stores to, and retrieves from, customer data from the customer relationship management database; and a load balancer associated with the application server to route user requests to the application server.