| US 7,529,728 B2 | ||
| Query optimization in a multi-tenant database system | ||
| Craig Weissman, San Francisco, Calif. (US); Dave Moellenhoff, Orinda, Calif. (US); Simon Wong, Redwood City, Calif. (US); and Paul Nakada, San Francisco, Calif. (US) | ||
| Assigned to salesforce.com, inc., San Francisco, Calif. (US) | ||
| Filed on Sep. 23, 2003, as Appl. No. 10/669,523. | ||
| Prior Publication US 2005/0065925 A1, Mar. 24, 2005 | ||
| Int. Cl. G06F 17/30 (2006.01) | ||
| U.S. Cl. 707—2 [707/3; 707/4; 707/5; 707/8; 707/9] | 34 Claims |

| 1. A method of optimizing a query in a multi-tenant database, said multi-tenant database having one or more data tables, each
table having one or more logical columns defining data categories and one or more logical rows associated with one or more
tenants, wherein a plurality of tenants have data stored in the data tables, the method comprising:
determining database indices for one or more of the data tables;
generating tenant-level statistics for one or more of said plurality of tenants for one or more of the data tables;
receiving a SQL query;
optimizing the SQL query based on the database indices; and
optimizing the SQL query based on the tenant-level statistics, thereby enabling SQL query optimization according to greater
semantic knowledge of use of the data tables.
|