Patent ID: 8108382

Claim:
A method for optimizing the execution of a query in a multi-database system comprising a plurality of system databases, the method comprising: identifying a region within a table, the table being referenced in the query; storing the region on a data-storage device on a first of the system databases in the multidatabase system; storing the region on a data-storage device on a second of the system databases in the multi-database system, the second system database being a different system database than the first system database; developing a first access plan for the query, the first access plan comprising accessing the version of the region stored on the first system database; developing a second access plan for the query, the second access plan comprising accessing the version of the region stored on the second system database; indexing the first version of the region using a first indexing scheme; indexing the second version of the region using a second indexing scheme; selecting between the first access plan and the second access plan to execute the query at least partly by considering the first indexing scheme and the second indexing scheme; executing the query using the selected access plan to produce a result; and storing the result.