|
Claims  |
|
|
I claim:
1. A method of displaying information representative of a query for a
relational database management system (RDBMS) having screen display means,
the query comprising a first portion used by the RDBMS to determine a
query execution plan and a second portion comprising elements, the query
execution plan comprising operations to be executed by the RDBMS, the
operations being interconnected through links, said method comprising:
generating a first set of information representative of the query execution
plan, said first set of information including operation names for the
respective operations of the query execution plan, possible options and at
least one characteristic of each of the operations;
analyzing said first set of information to select selected information
including said operation names, said possible options, said at least one
characteristics and the links;
performing a syntactical analysis of the query;
forming a syntactical graph from said syntactical analysis, said
syntactical graph comprising a second set of information including at
least one of said elements of said second portion of the query;
comparing said selected information from said first set of information with
second set of information to select said at least one element;
and displaying on said screen display means:
said operations in boxes respectively, each of said boxes incorporating
said related operation name, possible option and said characteristic;
links (28) between said boxes by a linear graphical form; and
said at least one element inside at least one box of said boxes.
2. The method of claim 1, wherein said syntactical graph has nodes and said
second set of information further includes types of said respective nodes
of the syntactical graph and said syntactical analysis comprises analyzing
operation of the RDBMS to determine said types.
3. The method of claim 2, wherein the RDBMS performs operations in a
predetermined order and said syntactical analysis further comprises
determining said operations of the RDBMS and said order of said
operations.
4. The method of claim 3, wherein said second set of information further
comprises an information associated with said types.
5. The method of claim 2, wherein said second set of information further
comprises information associated with said types.
6. The method of claim 1, wherein said first set of information has nodes
and said syntactical graph also has nodes and said step of comparing
comprises associating said nodes of said first set of information with
said nodes of said syntactical graph and placing projections and tests on
nodes of said first set of information.
7. The method of claim 6, wherein the RDBMS performs operations in a
predetermined order and said step of association of said nodes of said
first information with said nodes of said syntactical graph comprises
distinguishing between predictable operations and unpredictable operations
from said operations performed by the RDBMS, associating predictable nodes
of said first set of information with said predictable nodes of said
syntactical graph, with unpredictable nodes constituting links between
said associated predictable nodes.
8. Tool for displaying information representative of a query for a
relational database management system (RDBMS) having screen display means,
the query comprising a first portion used by the RDBMS to determine a
query execution plan and a second portion comprising elements, the query
execution plan comprising operations to be executed by the RDBMS, the
operations being interconnected through links, said tool comprising:
input means for a first set of information representative of the query
execution plan, said first set of information including operation names
for the respective operations of the query execution plan, possible
options and at least one characteristic of each of the operations,
means for analyzing said first set of information to select selected
information including said operation names, said possible options, said at
least one characteristic and the links,
means for performing a syntactical analysis of the query,
means for forming a syntactical graph from said syntactical analysis, said
syntactical graph comprising a second set of information including at
least one of the elements of the second portion of the query,
means for comparing said selected information from said first set of
information with said second set of information to select said at least
one element, and
means for displaying on said screen display means:
said operations in boxes respectively, each box respectively incorporating
said operation name, said possible option and said at least one
characteristic;
said links between said boxes by a linear graphical form; and
said at least one element inside at least one box of said boxes.
9. The tool of claim 8, wherein said syntactical graph has nodes and said
second set of information further includes types of said respective nodes
of the syntactical graph, and said means for performing a syntactical
analysis comprises means for analyzing operation of the RDBMS to determine
said types.
10. The tool of claim 9, wherein the RDBMS performs operations in a
predetermined order and said means for performing a syntactical analysis
further comprises means for determining said operations of the RDBMS and
said order of said operations.
11. The tool of claim 10, wherein said second set of information further
comprises an information associated with said types.
12. The tool of claim 9, wherein said second set of information further
comprises information associated with said types.
13. The tool of claim 88, wherein said first set of information has nodes
and said syntactical graph also has nodes and said means for comparing
comprises means for associating said nodes of said first set of
information with said nodes of said syntactical graph and placing
projections and tests on nodes of said first set of information.
14. The tool of claim 13, wherein the RDBMS performs operations in a
predetermined order and said means for association of said nodes of said
first information with said nodes of said syntactical graph comprises
means for distinguishing between predictable operations and unpredictable
operations from said operations performed by the RDBMS, means for
associating predictable nodes of said first set of information with said
predictable nodes of said syntactical graph, with unpredictable nodes
constituting links between said associated predictable nodes. |
|
|
|
|
Claims  |
|
|
Description  |
|
|
BACKGROUND OF THE INVENTION
The invention relates to a method to help in optimizing a query from a
relational data base management system, more currently known by its
acronym RDBMS. More particularly, it applies to the administration of the
RDBMS. It also relates to a method of syntactical analysis resulting
therefrom.
A data base may be defined as an integrated set of data that model a given
universe. The data used by various applications are grouped in the same
base in such a way as to avoid the problems of data duplication.
Associated with a data base is a conceptual schema that describes the
structure and type of the data that it contains and the constraints, which
must always be verified. The data base administrator has the task of
making sure of the verification of these constraints.
The data administration has three roles. First, it defines the data base
users by assigning them a name, a password, and a set of privileges or
rights for access to the data. It also defines the administrator or
administrators, who are the persons authorized to handle all or part of
the administration of the data base. The second role of the administration
is to assign to the administrator, or cause him to participate in, the
definition of the conceptual schema of the data base. The administrator
thus defines the schemas of the various tables and the rules relating to
these tables. In his final role, the administrator has possibility of
benefitting, in terms of performance, integrity and security, from the
conceptual schema of the base and of the RDBMS. It is this third role upon
which the subject of the present invention essentially bears.
When an RDBMS application is being developed, the role of an administrator
is to optimize the use of the RDBMS's resources. When a query is made at
the time of the application, the RDBMS chooses an access route for
executing the query. To optimize the performance of the application, the
administrator must analyze the queries sent and decide on the action to be
taken. His action may be to change the form of the query, and/or to create
or delete indexes in the tables concerned. His decision depends on the
information that indicates to him whether or not the current form of the
query is adequate, or whether the existing indexes are pertinent.
The indexes are physically independent of the data and may thus be deleted
and created at any moment. An index is used at the time of access to the
data, regardless of who created it. A table may have several indexes at
the same time. A compromise must be made between the number of indexes and
the overhead involved in updating them. An index may apply to more than
one column, and in that case it can assure the uniqueness of the columns
used. It also improves the performance of the queries for which the
selection condition will affect more than one column. A query with more
than one predicate can use multiple indexes, if they are unique, if the
predicates are equalities and are defined in the same table. In that case,
the partial results from each index are merged to constitute the
definitive result. Some RDBMS are capable of using the properties of
indexes and the characteristics of columns to decide which index to take
and which to avoid for the merge operation. Whether or not to use an index
is decided by the RDBMS optimizer. The decision varies depending on the
type of RDBMS.
On the other hand, the schema of an RDBMS may evolve dynamically. For
example, one or more fields may be added to a table, and indexes may be
created in a table. In this context, it may happen that the RDBMS does not
encounter an index that it must use, or encounters an index that it must
not use, for example if access is being gained to more than 10% of the
articles. In this latter case, the index becomes a hindrance. Given all
the possibilities in choice of the RDBMS to set up its plan, it is
estimated that the utilization of the resources can vary within a ratio of
1:10,000, depending on the formula of the query and the choice of indexes.
At present, optimizing a query is complicated. First, it is not automatic,
and specific RDBMS tools must be used to request the plan of execution of
the query. This plan is the concatenation of operations to be executed by
the data base server in order to process the query. To request this plan,
the user must write the query in the language of the RDBMS. Hence, writing
the query requires good knowledge of the query language of the RDBMS.
Moreover, it is rigorous and arduous work and involves a great loss of
time, aggravated by the risks of mistakes that ensue. In response, the
RDBMS furnishes the results of the request of the execution plan of the
query, in a variable form depending on the RDBMS. The plan is written in
the query language of the RDBMS and is currently present in the form of a
long table with multiple columns, for example. The table is written in
linear mode and appears on the screen only one page at a time. Analyzing
the table is accordingly highly complicated, and the user ordinarily makes
his task easier by requesting a printout of the table on paper. This means
that he must go through all the printing processes specific to that
terminal. The printout is done page by page, with column headings repeated
each page. Consequently, in the coded language, the administrator must
decrypt the hierarchy of processing the query and reconstitute the plan by
analyzing numerous columns and a large number of disordered lines on
various pages. This makes the search long and difficult. Moreover, the
administrator does not have a global view of the plan available, which
would ordinarily be too long to obtain and would be overly bothersome in
proportion to the advantage he would gain from it. Nevertheless, the
administrator must overcome this disadvantage as well as he can, in order
to decide how to optimize the query. For example, if he modifies the
query, he must rewrite the modified query, analyze the new table, and
compare it with the old table. The tools used to create an analysis table
do not save the preceding table in memory, and hence it must be printed
out in order to be able to refer to it to make the comparison with the new
table. In practice, the comparison accordingly consists of gathering the
long, difficult analyses of the two tables. Finally, the administrator
lacks a visual display of information about the objects used in the
processing. It will be appreciated that under these conditions, optimizing
a query is difficult to achieve rapidly, even for a skilled administrator.
One approach has been proposed to make the visual display and
interpretation of the plan of execution of a query easier, so that the
processing of the query can be optimized rapidly, at less cost. This
approach had the dual advantage of offering graphical representation of
the execution plan of the query and of being independent of the optimizer
and of the RDBMS query language. In a preferred variant embodiment of this
approach, this optimizing help could even be achieved by any user who does
not know the query language of the RDBMS. This approach is described in
the copending French patent application of the present applicant, filed on
Oct. 12, 1992 and having the serial number 92 12148 and corresponding U.S.
application of Eric Vachey, U.S. Ser. No. 08/128,159 (BULL 3360) filed
concurrently herewith.
This copending patent application proposes a method to help in optimizing a
query of an RDBMS, including the search for the plan of execution of the
query written in the query language of the RDBMS, characterized in that it
consists of constructing a tree, on the basis of this search, that
represents the plan of execution of the query, and representing the tree
on a screen.
This tree appears in the form boxes connected to one another by their links
of affiliation. Each of the boxes of the tree has a heading giving the
name of the operation concerned and a subheading giving its possible
option. Advantageously, a possible characteristic of the operation is
added here, such as the name of the object, and optionally the name of the
owner of the object to which the operation applies. An improvement
consists of writing this characteristic in a button of the box and
clicking on the button to request additional information about the object
relating to the button. For example, if the operation being performed on
the object that is clicked on is a table, then the additional information
includes elements that describe the table. On the other hand, if the
operation on the object clicked on is an index, then the additional
information includes a histogram.
In summary, the data furnished by the tree for execution of a query may be
all the data contained in the execution plan written in the query language
of the RDBMS. Thanks to the invention, the user can also obtain additional
information about some of these data. It will be appreciated that this
tree furnishes the user with a powerful tool to help in optimizing a
query.
Research into increasing the power has been done. One major problem
presents a stumbling block, as will be illustrated by a very simple
example to facilitate comprehension. Let it be assumed that the RDBMS
working in SQL is handling automobile shipping and contains a table known
as Type.sub.-- Car. For example, in its columns this table includes the
type of vehicle, model name "Mark", the price "Price", and the power
"Power". Let it now be assumed that the user of this table requests the
vehicle types having the model name XXX. The user will then write the
following query in the SQL language:
SELECT Type
FROM Type.sub.-- Car
WHERE Mark=`XXX`
The table representing the execution plan of this query accordingly takes
into account only the objects of the query, that is, Type.sub.-- Car. In
the query, the other elements relating to the WHERE clause indicate to the
RDBMS only that it should refer to the column "Mark" and there select the
model XXX and the elements relating to the SELECT clause indicating to the
RDBMS that it should return only the "Type" information in the result.
However, it is clear that these elements are not taken into account in the
table representing the execution plan of the query. In other words, this
table loses the other elements of the request, that is, Type, Mark and the
notation XXX in the query illustrated.
Since the execution tree of the query is constructed from the table
representing the plan of execution of this query, the elements lost from
this table cannot appear in the tree. It is consequently impossible to
incorporate these lost elements into the tree by using the prior art
method for help in optimizing the query. This made it impossible to
improve the help provided.
Yet incorporating these lacking elements into the boxes of the tree would
offer the user numerous advantages. First, the notation Mark=`XXX` would
have the advantage of being an image of the query. The table representing
the execution plan of the query would include not only the results of the
search for the execution plan of the query, but also the condition that
led to those results. It must be understood that the above example has
intentionally been simplified to the maximum, and that in practice a query
is much more complicated. Inserting all the elements of the query would
procure for the user a real image of this query, in addition to its
result, and would make him better able to understand their relationship.
This appreciation of their relationship would have the major advantage of
limiting the choice of modifications to be made for optimizing the query,
and of better formulating the modifications. In other words, a user who is
a nonspecialist in the query language of the RDBMS would be provided with
fast, easy help in attaining the best possible optimization of query
execution, because incorporating the lacking elements provides a highly
valuable guide in achieving this help.
SUMMARY OF THE INVENTION
The invention introduces a method that makes it possible to obtain all or
some of the descriptive elements of a query for the sake of simple and
rapid help for a user, even one who is not a specialist in the query
language of the RDBMS, to best optimize execution of the query.
The subject of the invention is a method for helping optimize a query of an
RDBMS, including the formation of a tree representative of the execution
plan of the query and representing it on a screen, characterized in that
it consists of making the syntactical analysis of the query in order to
form a syntactical graph, comparing the elements of the tree with those of
the graph, and supplementing the tree with elements contained only in the
graph.
As a corollary, the subject of the invention is also a method of
syntactical analysis of an RDBMS query, characterized in that it consists
of analyzing the function of the RDBMS in order to determine in particular
the types of nodes of the syntactical graph, and preferably the
information associated with these types.
The syntactical analysis may include the determination of the operations
executed by the RDBMS and the order in which these operations are
executed. This order has the advantage of establishing a relationship
between the query and the execution plan. It also has the advantage of
defining the conditions by which the types of nodes of the graph and the
associated information are determined.
BRIEF DESCRIPTION OF THE DRAWINGS
The characteristics and advantages of the invention will become apparent
from the ensuing description, given by way of example and illustrated in
the accompanying drawings.
In the drawings:
FIG. 1, taking the prior art as an example, illustrates a representative
table of the execution plan written in the query language of an RDBMS and
relating to the query shown in FIG. 2C;
FIGS. 2A, 2B and 2C illustrate log-on screens obtained from a tool
according to the invention that employs the method of the invention;
FIG. 3 illustrates an example of a tree for executing the query shown in
FIG. 2C, obtained by employing the method of the invention to help in
optimizing the query; and
FIGS. 4A, 4B and 4C show histograms than can be obtained by employing the
method of the invention;
FIGS. 5A-5N illustrate criteria for the syntactical analysis of the query
employed by the method of the invention;
FIG. 6 shows a graph resulting from the syntactical query analysis done in
accordance with the analysis criteria defined in FIGS. 5A-5N;
FIG. 7 illustrates an association of nodes that can be provided between an
execution tree for a query and a graph for analysis of the query;
FIG. 8 illustrates a placement of projections for the association of the
tree with the graph; FIGS. 9A-9D illustrate a first example of placement
of tests for associating the tree with the graph;
FIGS. 10A-10B illustrate a second example of placement of tests for
associating the tree with the graph;
FIG. 11 illustrates a representative network for a complete query obtained
by employing the method of the invention;
FIGS. 12A-12H show various steps in an embodiment of the method of the
invention; and
FIG. 13 shows a complete tree in accordance with the invention for the
execution of a query.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
For the sake of clarity and simplicity, the description will pertain to a
non-limiting example of RDBMS known by the registered trademark Oracle V6,
produced by the Oracle Corporation and using the standard-sized language
SQL (Structured Query Language) and running on a Unix station, the latter
being a trademark registered by American Telephone and Telegraph. The
example shown will relate to queries of the SELECT type in this RDBMS, it
being understood that this example is limiting neither to this type in
this RDBMS nor to other RDBMSs.
The functional architecture of Oracle is organized in four concentric
layers, which in order, beginning at the center, are the core, the
dictionary, the SQL layer, and the outer layer. The first three layers are
called fundamental layers.
The core communicates with the data base and can connect with other cores
in a distributed data base environment. One of its essential functions is
the optimal execution of queries, thanks to an integrated SQL query
optimizer.
The data dictionary is a metabase. It is made up of a set of tables and
views that are manipulated with the aid of the SQL language. Its contents
reflect an image of the base at any moment and thus provides a dynamic
description of the data base. In particular, it makes it possible to
describe the objects of the base (tables, columns, views, indexes, etc.)
and the privileges and rights of the users with respect to the various
objects. The dictionary is used for the administration of the data base if
the user has an administration privilege. A user is considered to be an
administrator if he has the DBA privilege. When the system is installed,
two users are considered as administrators: SYS and SYSTEM. Only the SYS
administrator has access to the data dictionary tables.
The SQL layer is the last fundamental layer of Oracle. It plays the role of
an interface between the core and the tools of the outer layer. Hence any
operation of access to the data is expressed in SQL language.
Finally, the outer layer is composed of tools that facilitate the
development of applications and the use of all the functions offered by
the three fundamental layers. One of these tools is SQL*Plus, which is an
interactive fourth-generation interface with the SQL layer. Any SQL
command may be started from SQL*Plus. It makes it possible in particular
to parametrize the working environment (length of a line per pages--number
of lines per page, etc.) and formatting the results of the SQL queries on
the screen or on paper. Another tool is SQL*DBA, oriented toward
administration of the data base.
For good comprehension of the present invention, the major operations of
Oracle will be recalled very briefly:
CONCATENATION: execution of the OR operation by calling up indexes. Oracle
offers two ways of executing an OR operation.
FILTER: If this operation has two branches, then for each tuple of the
first son, the existence of a flow originating in the second son is
verified. If this flow exists, then FILTER allows the tuple to pass. This
operation occurs in the SELECT clauses involved. If the FILTER has only
one branch, its algorithm is different to allow the tuples that make a
binary value formula true to pass. This operation then replaces the HAVING
clause.
INDEX: makes access to an index. This operation can appear alone or
followed by a TABLE ACCESS operation, depending on whether the values in
the index are used directly or serve to select tuples from the table.
MERGE JOIN: This is the only operation that performs a merge join. It
effects the merger of two previously sorted sets. It is used for joins
whose test is an equality and for which no field has been indexed.
NESTED LOOPS: for each tuple originating from the first son, the cartesian
product with the tuples originating in the second son is taken.
TABLE ACCESS: makes access to a table and is capable of making
restrictions.
SORT UNIQUE: Elimination of pairs made with the merge operations UNION,
MINUS, INTERSECT and used for the UNIQUE option of the SELECT clause.
SORT JOIN: Performs sorting of the fields of the join with the MERGE JOIN
operation.
SORT ORDER BY: Sort by the specifications of the ORDER clause.
SORT GROUP BY: Executes the groups of SELECT and HAVING clauses and sorts
in accordance with the specifications of the GROUP BY clause.
The conventional method for helping and optimizing a query of an RDBMS
includes searching for a plan of execution of the query written in the
query language of the RDBMS. FIG. 2C, in a window on a screen, shows an
example of a query 10 written in the query language SQL of Oracle. In
Oracle, the search for the plan of execution of the query 10 can be made
by using the tool SQL*Plus or SQL*DBA. The query 10 is written, and in
response the tool constructs a table representing the plan selected by the
core of RDBMS in order to execute the query. This table must be created
beforehand by the user and may be consulted by the SQL selection commands.
FIG. 1 shows a very brief example, for the sake of convenience, of a table
11 obtained by printout page by page of the corresponding table that has
been created by the RDBMS upon the request of the user. The table 11 is
composed of two pages, each repeating the headings of seven representative
columns, which in succession are operations (OPERATION), options (OPTION),
the owner of the object (OBJECT.sub.-- OWNER), the name of the object
(OBJECT.sub.-- NAME), and for each operation, its number (ID), the number
of the preceding operation (PARE) and its position (POSI) if the operation
has sister operations. The simple query 10 illustrated in FIG. 2C provides
some idea of a table relating to an ordinary query and is a good
illustration of the serious problem the user is presented with in
optimizing the execution of the query. In practice, only if the
administrator is a skilled user can he interpret this table. It will also
be understood that even for the administrator, interpreting the table is
as a rule generally time-consuming and difficult. Moreover, in this way he
has no global overview whatever of the execution plan. The invention
presents a solution that makes it unnecessary to consult a person with
highly sophisticated knowledge of the administration of an RDBMS.
In one characteristic of the invention, a searching tool called DB*EXPLAIN
has been created in order first to propose to the user that the table
representing the execution plan of a query be created automatically. In an
accessory advantage of this tool, the administrator does not have to write
a query in the SQL language.
FIGS. 2A, 2B and 2C by way of example illustrate a log-on screen 12 of the
tool DB*EXPLAIN. This example has been created using the OSF/Motif
software, this being a trademark registered by Open Software Foundation,
Inc. in the United States. The screen 12 contains a menu bar 13 and a
dialog window 14. The menu bar 13 includes three main menus, File, Query
and Explain. The File menu 15 is represented by FIG. 2A and pertains to
the queries obtained in the files. It presents four options, Open, Save,
Save As, and Exit. By clicking on the Open option, a selection window 16
appears in the dialog window 14. The selection window 16 in standardized
fashion incorporates a scrolling list 17 of current files (F1, F2, etc.)
containing queries, and a box 18 making it possible to write the name of a
file to be selected. By clicking on the Save option, of the File menu 15,
the file desired is saved under the name it already has. By clicking on
the Save As option, the file desired is saved under the name chosen and
written by the user. Finally, one clicks on the Exit option to exit from
DB*EXPLAIN.
FIG. 2B by way of example illustrates the query menu 19 in the log-on
screen 12. It incorporates only a Load View option serving to open a
selection window 20 that incorporates a scrolling list 21 of the views
contained in the dictionary of the RDBMS as another source of queries (in
the example shown, these views are SYS.DBA.sub.-- CLUSTERS and
SYS.DBA.sub.-- TABLES) and a box 22 making it possible to write the name
of a desired view. FIG. 2B also shows the explain menu 23, which
incorporates only the Plan option. By clicking on this option, the tool
DB*EXPLAIN constructs a representative table of the plan of execution of
the query, advantageously in the same way as the tools SQL*Plus and
SQL*DBA. Clearly, it would be possible to adapt the tool DB*EXPLAIN so
that it can represent this table in an editing window, in the same manner
as the table 11 shown in FIG. 1. However, the method of the invention
adapted to the example shown has need of only the table in order to
furnish a representation of the execution plan that is clearly better than
the table 11 shown, so that in practice this representation is
superfluous.
FIG. 2C illustrates an editing window 24 produced in the dialog window 14
in order to represent a query originating from a selected file among the
scrolling list 17 or defined in the box 18 of the screen illustrated in
FIG. 2B, or of the view selected in the scrolling list 21 or defined in
the box 22 of FIG. 2B. FIG. 2C, in the editing window 24, shows the query
10 which is presented by way of example as having selected the view
SYS.DBA.sub.-- CLUSTERS in the list 21 of FIG. 2B. This view pertains to
the clusters of the data base and belongs to the SYS administrator.
Because of the tool DB*EXPLAIN, there is no longer any need to write an
already available query. Thus this tool has the major advantage of making
it unnecessary to design and rewrite the query and avoiding all the
attendant risks of mistakes and lost time. Another advantage is the
capability of directly and easily modifying the contents of the query that
appears in the editing window 24, thanks to the use, in the embodiment
chosen as a preferred example, of the OSF/Motif software.
One of the phases of the method of the invention consists of constructing
an execution tree of the query, based on the execution plan of the query
10, and representing the tree on a screen. In the screen shown in FIG. 3,
a window 25 contains a tree 26 representing the execution of the query 10.
The tree 26 is made of boxes 27 connected to one another by links 28. The
construction of the links 28 of the tree 26 has been done by analysis of
the results of the request for the plan of execution in the query written
in the query language of the RDBMS, this result being the table 11 for the
RDBMS chosen by way of example. The analysis of the query 10 has
advantageously been done in practice by structures in C language, which
point to affiliated structures in order to construct a purely software
graph. In a very simple example that is sufficient on its own for
employing the method of the invention, the structure associated with each
of the nodes constituted by the boxes 27 of the tree 26 may be produced
simply on the basis of the table produced by Explain Plan in the following
formula:
______________________________________
typedef struct node.sub.-- {
int type;
char operation [30];
char options [30];
char object.sub.-- name [30];
char object.sub.-- owner.sub.-- [30];
int id;
int parent.sub.-- id;
int position;
struct node.sub.--
* brother;
struct node.sub.--
* child;
} Node;
______________________________________
Each time a tuple is rendered, one of the boxes 27 is created in the
conventional manner, which is easy for one skilled in the art, for example
using a graphical library function of the OSF/Motif software. Another
exemplary embodiment adapted to the set of phases constituting the method
of the invention will be seen later, with reference to the appended file
named struct.h. In summary, in the tree 26 shown, the boxes 27 and their
links 28 have been created by analysis of the query 10 in the table 11
that represents the execution plan. In the example shown in FIG. 3, the
window 25 for showing the tree 26 is advantageously furnished by the tool
DB*EXPLAIN under the Plan option and is accompanied by the name of the
view and by the window 24 for editing the query 10 that have been shown in
FIG. 2C.
The tree 26 may incorporate all or some of the information resulting in the
search for the execution plan of the query written in the RDBMS query
language, such as the information contained in table 11 of FIG. 1. For
example, each box 27 has as a heading the name of the operation to which
this box relates. Hence in FIG. 3 the names NESTED LOOPS, TABLE ACCESS and
INDEX, which are shown in the OPERATION column of table 11 in FIG. 1, are
seen. If the operation constituting the heading of a box 27 has an option
being executed for a given object, then the name of this option may be
mentioned in the box, advantageously as a subheading. Similarly, if the
operation mentioned in the heading in a box 27 has characteristics such as
the name of the object and the name of the owner of the object to which
the operation option applies, all or some of these characteristics may be
indicated in the box. All of these advantageous options of the invention
are contained in the tree 26 shown in FIG. 3. Thus in the thirteen boxes
27 of the tree 26, the names of the thirteen operations mentioned in table
11 are found, supplemented with the possible option that is executed for a
given object, the name of the object, and the name of the owner of the
object. The tree 26 affords the advantage of being easily understood by
any user, regardless of his skill in the query language of the RDBMS, and
of furnishing him a global overview of the execution plan of the query.
The user seeing the tree 26 can thus more easily and quickly decide on
what action to take to optimize the query that has been made. On the other
hand, thanks to the tool DB*EXPLAIN, it has been seen that the user need
not write the query and can easily modify it in the editing window 24 of
FIG. 2C. After modification, the administrator can have the new execution
tree very quickly, in order to find out how effective his modification is.
The tool affords the additional advantage of saving the preceding tree and
thus enables the administrator to compare the two trees easily and
quickly.
Naturally, these advantages may also be afforded without using the tool
DB*EXPLAIN, and by using the conventional means for searching for the
execution plan of a query in the query language of the RDBMS. The results
of this search are shown in a table 11 in the RDBMS chosen by way of
example, but it will be a | | |