Emulating a database system
View Patent ↗A method and apparatus provides for the extraction of environment information from a target database system. The environment information includes at least one of cost-related information and random sample statistics. The cost-related information and/or random sample statistics are imported to a test system, where the cost-related information and/or random sample statistics are used in query plan analysis by an optimizer.
1. An article comprising at least one computer-readable storage medium containing instructions that when executed cause a computerized system to:
import random sample statistics of a target database system into a test system for emulating the target database system, wherein the target database system supports a standard database query language;
store the random sample statistics in a storage location;
generate a full set of statistics from the random sample statistics; and
use the full set of statistics in selecting a query plan in response to a given query;
wherein the instructions when executed also cause the computerized system to:
import cost-related information of the target database system; and
emulate an environment of the target database system based on the random sample statistics and cost-related information of the target database system,
wherein using the full set of statistics in selecting the query plan is performed in the emulated environment.
2. A computer-implemented method comprising:
importing random sample statistics of a target database system into a test system for emulating the target database system, wherein the target database system supports a standard database query language;
storing the random sample statistics in a storage location;
generating a full set of statistics from the random sample statistics; and
using the full set of statistics in selecting a query plan in response to a given query;
wherein the method also includes:
importing cost-related information of the target database system; and
emulating an environment of the target database system based on the random sample statistics and cost-related information of the target database system,
wherein using the full set of statistics in selecting the query plan is performed in the emulated environment.