-
公开(公告)号:CA2382714A1
公开(公告)日:2003-10-19
申请号:CA2382714
申请日:2002-04-19
Applicant: IBM CANADA
Inventor: VINCENT TIMOTHY J , SCHIEFER KLAUS BERNHARD , O'CONNELL WILLIAM T , LIMOGES JOSEPH SERGE , BEGG ROBERT A , EVANS DOMINIQUE J
IPC: G06F17/30
Abstract: A method, computer program product and computing device for promoting reuse ofpreviously generated access plans in a relational DBMS are disclosed. SQL statements containing literals are amended so as to substitute a parameter marker for each literal. Amended statements are provided to the DBMS along with parameters comprising the substituted literals and a substitution indicator indicating that the substitution has been performed. The DBMS assesses the soundness of the substitutions that are performed. Soundness may be measured in terms of the semantic correctness of the amended statement and the likelihood that the literal substitution wi ll improve DBMS efficiency. If a substitution is unsound, the DBMS may obtain and optimize (i.e. select an access plan for) the original version of the amended SQL statement. Otherwise, the amended statement is optimized. Advantageously, SQL statements originally differing only in the value of one or more literals may become functionally equivalent, and the reuse of cached, previously generated access plans is thus promoted. Improvements in DBMS efficiency may thus be achieved .