WO2007115847A1 - Automatic optimisation of request processing in databank systems - Google Patents
Automatic optimisation of request processing in databank systems Download PDFInfo
- Publication number
- WO2007115847A1 WO2007115847A1 PCT/EP2007/051296 EP2007051296W WO2007115847A1 WO 2007115847 A1 WO2007115847 A1 WO 2007115847A1 EP 2007051296 W EP2007051296 W EP 2007051296W WO 2007115847 A1 WO2007115847 A1 WO 2007115847A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- hint
- application
- database
- hints
- databank
- Prior art date
Links
- 238000012545 processing Methods 0.000 title claims abstract description 15
- 238000000034 method Methods 0.000 claims abstract description 12
- 230000002123 temporal effect Effects 0.000 claims description 2
- 238000004891 communication Methods 0.000 abstract description 2
- 230000010354 integration Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 7
- 230000008859 change Effects 0.000 description 6
- 238000011161 development Methods 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 4
- 238000005457 optimization Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 230000009849 deactivation Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000013479 data entry Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
Definitions
- the present invention relates to a system and method for optimizing query processing in database management systems having at least one relational database, at least one server, and at least one client in communication with the server for data access requests, wherein the database management system includes an optimizer controls data access requests and uses the hints from client or server applications for external control of the optimizer.
- Corresponding optimization systems and corresponding methods for the execution of data access requests or database queries are known from the prior art, in particular for the administration and access of extensive databases.
- One such system is, for example, the Oracle database system, which supports a standard query language (SQL) and uses an optimizer that controls the processing of database access requests or database queries, and the optimizer also supports hints.
- Hints are instructions to the optimizer, regardless of one of the optimizer otherwise provided expiration of a database query at least in part to make a certain predetermined by the hint flow control. For example, a database query might require a more or less complex combination of data from different tables, with the speed and efficiency of the resulting query results depending on the order in which corresponding tables or their data are combined or compared.
- the optimizer uses general criteria to control the flow, such as the relative size of the tables to make a particular order of the combinations.
- the user or programmer of a particular application may be aware that a query criterion is highly selective, especially with respect to a particular table, but that would have a subordinate ranking following the schema used by the optimizer.
- a hint can tell the optimizer to start processing the query with the table for which a query criterion is highly selective, which can significantly speed up the processing of the entire data query.
- Such hints are therefore inserted by a programmer or a suitably experienced user from his or her particular knowledge of an application and the tables which the particular application can access in the case of database queries, into the program code of an application or into corresponding database query blocks of an application.
- the present invention has the object to provide a system and a method of the type mentioned, which allow a much faster and easier adjustment of the optimization of database access requests or database queries.
- This object is achieved by assigning an application memory space for storing hints in a hint table associated with the application, and providing a hint call instead of a hint in the application or building block of the database query application is by which a hint is called from the hint table.
- each application is allocated memory space for receiving an associated hint table, and the static hints previously embedded in program code of the application or a database query block are replaced with hint calls. which invoke a hint from the hint table specified by the call.
- This makes it possible to dynamically vary the hitherto static hints at any time by updating the associated hint table without interrupting the application in any way.
- the external control or influencing of the optimizer by Hints can be much faster and easier adapted to the actual circumstances and needs.
- the call is made by embedding a hint variable in an application instead of a hint, which is defined accordingly and has an identifier, or text, by which at that point in the table Hint to be inserted is clearly defined.
- an embodiment of the invention is preferred in which independent and separate hint tables are assigned for different applications.
- this does not exclude that a hint table is concurrently assigned to two or more different applications, especially if the applications have relatively similar similarities leading to identical or similar database queries.
- a master table of hints as part of a central hint administration, wherein the hint tables assigned to individual applications are subsets of the hints from the master table and are selected according to the specific needs of each application.
- the multiple identical or similar evolution of hints by different people is avoided since all are centrally managed for a variety of applications in a large, possibly networked system such as a wide area network are stored, even if subsets of the central hint table are each separately assigned to individual applications and stored in the appendices associated memory space.
- the present invention develops its advantages, especially in connection with very large systems, in particular a database with more than 200 GB and preferably more than 500 GB of storage space with a large number of data stored in a corresponding multiplicity of tables or other files are.
- Smaller systems often come without hints, but in principle it is the more useful and effective the present invention, the more extensive and complex the databases and the slower the processors used or the smaller their capacity.
- the Hints a hint table can be selectively activated or deactivated.
- this allows a simple parameter control by the activation or deactivation of a hint of the value of a concrete, variable or adjustable - -
- the present invention is also directed to a corresponding method comprising a database management system having at least one relational database, at least one server, and at least one client contacting the server for database queries, the database management system having an optimizer of the processing flow controls database queries and uses the client's or server's applications for external control.
- a hint call is provided by which a hint is called from a hint table assigned to the application.
- a central master hint table is used by an administrator who also determines which hints are used and / or activated from the master hint table to generate the individual hint tables associated with the respective applications ,
- a central master hint table is used by an administrator who also determines which hints are used and / or activated from the master hint table to generate the individual hint tables associated with the respective applications .
- subordinate operators or administrators may be granted certain access rights to individual hint tables, which allow, for example, certain hints to be enabled or disabled or periods of activation and deactivation of hints. Preferably, however, this is also done centrally by a hint management system from which the sole access to the master hint table exists.
- the single FIGURE shows schematically a database management system 1 which, inter alia, has an optimizer 5 and which is connected to a server 3 and a database 2.
- the database management system can also be integrated into the server 3 or comprise all elements shown.
- the server 3 is in turn connected to a client 4, whereby the server and client can possibly also be identical.
- An application program 6 or even several application programs 6 run on the client 4 or else on the server 3.
- the database management system 1 is activated, whereupon the optimizer 5 analyzes the database query and interprets and converts it into a concrete sequence of logical operations to the desired data from the database 2 in the shortest possible time and with the least possible effort to extract.
- the database 2 is a relational database, which is shown here only schematically as a uniform block 2, but which in fact can consist of a large number of individual databases which may be present on a database server (not shown) and implemented locally, but which may also be in the form of distributed memory, which may include memory of client 4 and server 3 under certain circumstances.
- the optimizer attempts to control the order of logical operations in such a way that the result of the database query is achieved as economically as possible and in the shortest possible time.
- information about the database or about individual tables of the database 2 may be known or accessible to the user of the application 6, which the optimizer 5 does not have available and does not involve in the definition of the control processes in automatic operation.
- a user or user or administrator of the system may therefore provide hints or instructions to the optimizer 5 from the application 6, which override other operations otherwise provided or planned by the optimizer, in this way Optimizer 5's effect on database query control.
- the hints are not included as such in the application 6 or corresponding building blocks that trigger a database query, but rather the application 6 only contains calls of corresponding hints stored in a hint table 7 associated with the application 6 .
- the optimizer 5 therefore calls according to the received with the database query from the application 6 Hin calls the Hints from the hint table 7 and integrates them according to the hint specifications in the Processing or the time or ranking of the searches carried out in the context of the database query.
- a hint management system is additionally provided which creates, maintains and updates a master H int table 9 and which generates the individual hint tables 7 from the master hint table.
- the application 6 and the hint table 7 in the present case is only an example of a variety of possible applications with associated hint tables, wherein the number of clients and servers in principle can be arbitrary and the entire system part of a larger Network as described above for database 2. It should be understood that the benefits of the present invention will be particularly apparent in very large databases that include, for example, more than 500 gigabytes of memory in a variety of different tables. With very complex and fragmented databases and with a relatively slow-running database management system or server, however, the system can already lead to a noticeable acceleration in the processing of database queries even with smaller memory sizes of eg 100 to 200 gigabytes.
- Hints are SQL-embedded instructions for the Oracle Optimizer that affect the execution plan of SQL statements. The use of hints is imperative if technical knowledge should flow into the execution of SQL statements. How should the optimizer z. For example, you know that an index with the field Error flag is highly selective for the case "Yes”, but not selective at all for the case "No". Hints are still necessary if the optimizer - for whatever reason - does not take the desired / optimal execution plan.
- a Hint management controllable via master data tables has been developed.
- the database request invocations must be uniquely identifiable in a program (e.g., by unique numbering or paging in program modules with a unique name). This uniqueness is necessary so that the respective hint data record can be drawn from the master data tables of the hint administration, which can then be transferred to the database request statement via a program variable.
- the hint usage is shown below.
- the database request accesses are outsourced in modularized units (function modules).
- Whether hints are actually needed is determined during development, in the test or in productive use.
- the corresponding maintenance of the hint master data takes place, for example. by the database administrators or the technical maintainers of the applications. If no hint is entered in the hint table for a database request call, inserting the back text% _hints does not change the database access.
- vl_hint_text DATA: vl_hint_text like / lrs / s ⁇ shint-hint_text.
- the macro get-hint is called by default with the select number '00' (3rd transfer parameter). This call takes place once per function module and fills an internal table with all hint texts for this when number and especially the variable vl_hint_text with the hint text for the default case '00''01'. Further hint text selections for this when number will only be available via the macro get-hint-from-itab (see below).
- Hint master data is done by DP / AI. If there is no master data entry for a particular when number, inserting the hint text (% _hint %) in the select statement does not change the DB access.
- Get hint text get-hint cl_objname vp_whenum 1 OO 'vl_hint_text.
- Example 2 2 hints for a select within a when number.
- the macro get-hint is called first as described above.
- the desired hint text is provided with the macro get-hint-from-itab specifying the appropriate select (1st parameter) and consecutive number (2nd parameter).
- Example 3 Multiple hints for multiple selects within a when number.
- the macro get-hint is called first as described above.
- the desired hint text is provided with the get-hint-from-itab macro, specifying the appropriate Select (1st parameter) and consecutive number (2nd parameter).
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to a system for automatic optimisation of request processing in data bank or data bank management systems (1), comprising at least one relational databank (2), at least one server (3) and at least one client (4), in communication connection to the server for data access requests, said databank management system (1), comprising an optimiser (5), controlling the running of data access requests and using hints from client (4) or server (3) applications (6) for external control of the optimiser (5). The invention further relates to a method for optimisation of databank requests in such a databank management system. According to the invention, a system and method may be achieved, permitting an essentially more rapid and simpler matching of the optimisation of databank access requests or databank queries, by means of system provision of memory space to at least one application (6) for a hint table (7) and that in place of a hint in the application or in a component of a data access request, a hint call is provided, by means of which a hint is called from the hint table (7), stored in the memory for external control of the optimiser (5). For teh method, provisionis made for integration in the programme code of an application of at least one hint call, by means of which a hint is called from a hint table, provided for the application and stored outside the programme code and processed by the application on a databank query for optimisation of the databank query.
Description
Automatische Optimierung der Anfragebearbeitung in Datenbanksystemen Automatic optimization of query processing in database systems
Die vorliegende Erfindung bezieht sich auf ein System und ein Verfahren zur Optimierung der Anfragebearbeitung in Datenbankmanagementsystemen mit mindestens einer relationalen Datenbank, mindestens einem Server und mindestens einem Client, der für Datenzugriffsanforderungen mit dem Server in Kommunikationsverbindung tritt, wobei das Datenbankmanagementsystem einen Optimierer aufweist, der Abläufe von Datenzugriffsanforderungen steuert und der Hints aus Anwendungen des Clients oder Servers für eine externe Steuerung des Optimierers verwendet.The present invention relates to a system and method for optimizing query processing in database management systems having at least one relational database, at least one server, and at least one client in communication with the server for data access requests, wherein the database management system includes an optimizer controls data access requests and uses the hints from client or server applications for external control of the optimizer.
Entsprechende Optimierungssysteme und entsprechende Verfahren für den Ablauf von Daten- Zugriffsanforderungen bzw. Datenbankabfragen sind aus dem Stand der Technik insbesondere für die Verwaltung und den Zugriff umfangreicher Datenbanken bekannt. Ein solches System ist beispielsweise das Oracle-Datenbanksystem, welches eine Standardabfragesprache (SQL - Standard Query Language) unterstützt und einen Optimierer verwendet, welcher die Verarbeitung bzw. den Ablauf von Datenbankzugriffsanforderungen bzw. Datenbankabfragen steuert, wobei der Optimierer außerdem Hints unterstützt. Hints sind Anweisungen an den Optimierer, unabhängig von einem von dem Optimierer ansonsten vorgesehenen Ablauf einer Datenbankabfrage zumindest in Teilen eine bestimmte, durch den Hint vorgegebene Ablaufsteuerung vorzunehmen. Beispielsweise könnte eine Datenbankabfrage eine mehr oder weniger komplexe Kombination der Daten verschiedener Tabellen erfordern, wobei die Geschwindigkeit und Effizienz der daraus resultierenden Abfrageergebnisse von der Reihenfolge abhängt, in welcher entsprechende Tabellen bzw. deren Daten miteinander kombiniert bzw. verglichen werden. Der Optimierer verwendet für die Steuerung des Ablaufs allgemeine Kriterien, wie z.B. den relativen Umfang der Tabellen, um eine bestimmte Reihenfolge der Kombinationen vorzunehmen. Dagegen kann dem Benutzer oder Programmierer einer bestimmten Anwendung bekannt sein, daß ein Abfragekriterium gerade in Bezug auf eine ganz bestimmte Ta- belle hochselektiv ist, die aber nach dem vom Optimierer verwendeten Schema eine nachgeordnete Rangfolge hätte. Durch einen Hint kann der Optimierer angewiesen werden, bei Bearbeitung der Abfrage mit der Tabelle zu beginnen, für die ein Abfragekriterium hochselektiv ist, was zu einer erheblichen Beschleunigung in der Bearbeitung der gesamten Datenabfrage führen kann. Derartige Hints werden daher von einem Programmierer oder ein entsprechend erfahrener Benutzer aus sei- ner speziellen Kenntnis einer Anwendung und der Tabellen, auf welche die spezielle Anwendung im Falle von Datenbankabfragen zugreifen kann, in den Programmcode einer Anwendung bzw. in entsprechende Datenbankabfragebausteine einer Anwendung eingefügt.
Da sich jedoch sowohl die konkreten Anwendungen als auch die gesuchte Daten enthaltende Dateien oder Tabellen hinsichtlich Umfang und Inhalt erheblich verändern können, ist zumindest von Zeit zu Zeit eine entsprechende Anpassung derartiger Hints erforderlich. Ebenso können neue Datenbankabfragen aufgrund sich ändernder oder neuer Anwendungen oder aufgrund neuer Dienstleis- tungsangebote die Entwicklung und den Einsatz neuer Hints erfordern. Dies bedingt allerdings Unterbrechungen des Ablaufs der Anwendung, da bei einer Änderung von Hints unmittelbar in den Programmcode eingegriffen wird.Corresponding optimization systems and corresponding methods for the execution of data access requests or database queries are known from the prior art, in particular for the administration and access of extensive databases. One such system is, for example, the Oracle database system, which supports a standard query language (SQL) and uses an optimizer that controls the processing of database access requests or database queries, and the optimizer also supports hints. Hints are instructions to the optimizer, regardless of one of the optimizer otherwise provided expiration of a database query at least in part to make a certain predetermined by the hint flow control. For example, a database query might require a more or less complex combination of data from different tables, with the speed and efficiency of the resulting query results depending on the order in which corresponding tables or their data are combined or compared. The optimizer uses general criteria to control the flow, such as the relative size of the tables to make a particular order of the combinations. In contrast, the user or programmer of a particular application may be aware that a query criterion is highly selective, especially with respect to a particular table, but that would have a subordinate ranking following the schema used by the optimizer. A hint can tell the optimizer to start processing the query with the table for which a query criterion is highly selective, which can significantly speed up the processing of the entire data query. Such hints are therefore inserted by a programmer or a suitably experienced user from his or her particular knowledge of an application and the tables which the particular application can access in the case of database queries, into the program code of an application or into corresponding database query blocks of an application. However, since both the actual applications and the files or tables containing the data searched for can change significantly in terms of size and content, at least from time to time a corresponding adjustment of such hints is required. Likewise, new database queries may require the development and deployment of new hints due to changing or new applications or new service offerings. However, this requires interruptions of the execution of the application, as is intervened in a change of Hints directly into the program code.
Darüber hinaus muß dies im Falle einer Vielzahl von unterschiedlichen Anwendungen regelmäßig und unabhängig voneinander für alle Anwendungen wiederholt werden, wobei teilweise die in verschiedenen Anwendungen verwendeten Hints identisch sein können.Moreover, in the case of a variety of different applications, this must be repeated regularly and independently for all applications, with some of the hints used in different applications being identical.
Die entsprechende Pflege von Anwendungen einschließlich der darin eingebetteten Hints ist relativ zeit- und kostenaufwendig, insbesondere dann, wenn ein Anwendungsprogramm sehr umfangreich ist und gleichzeitig von einer großen Zahl von Benutzern verwendet wird, deren Arbeit für eine entsprechende Wartung und Pflege des Anwendungsprogramms unterbrochen werden muß. Alternativ muß eine solche Pflege außerhalb üblicher Betriebszeiten erfolgen. Allerdings gibt es Anwendungen, die im 24-Stunden-Betrieb laufen und insbesondere auch Anwendungen, die in weltweit vernetzten Systemen laufen, so daß eine Unterbrechung des Betriebs, und sei es nur zur Neuinstallati- on bzw. Ergänzung der Hints durch Patches oder dergleichen, in jedem Fall aufwendig und kostenintensiv und mit Unannehmlichkeiten für den Anwender verbunden ist.The proper maintenance of applications, including the hints embedded therein, is relatively time-consuming and costly, especially when an application program is very large in size and at the same time used by a large number of users whose work must be interrupted for proper maintenance of the application program , Alternatively, such care must be done outside normal operating hours. However, there are applications that run in 24-hour operation, and in particular, applications that run in globally networked systems, so that an interruption of the operation, and only to reinstall or supplement the Hints by patches or the like, In any case, consuming and expensive and associated with inconvenience to the user.
Gegenüber diesem Stand der Technik liegt der vorliegenden Erfindung die Aufgabe zugrunde, ein System und ein Verfahren der eingangs genannten Art zu schaffen, welche eine wesentlich schnel- lere und einfachere Anpassung der Optimierung von Datenbankzugriffsanforderungen bzw. Datenbankabfragen erlauben.Compared to this prior art, the present invention has the object to provide a system and a method of the type mentioned, which allow a much faster and easier adjustment of the optimization of database access requests or database queries.
Diese Aufgabe wird dadurch gelöst, daß einer Anwendung Speicherraum für das Speichern von Hints in einer der Anwendung zugeordneten Hint-Tabelle zugewiesen wird oder ist, und daß in der Anwendung bzw. einem Baustein der Anwendung für eine Datenbankabfrage anstelle eines Hints ein Hint-Aufruf vorgesehen ist, durch welchen ein Hint aus der Hint-Tabelle aufgerufen wird.This object is achieved by assigning an application memory space for storing hints in a hint table associated with the application, and providing a hint call instead of a hint in the application or building block of the database query application is by which a hint is called from the hint table.
Demnach sieht die vorliegende Erfindung vor, daß jeder Anwendung Speicherplatz bzw. Speicherraum für die Aufnahme einer zugeordneten Hint-Tabelle zugeordnet ist, und die zuvor in Programm- code der Anwendung oder eines Bausteins für Datenbankabfragen eingebetteten, statischen Hints werden durch Hint-Aufrufe ersetzt, die einen durch den Aufruf näher bezeichneten Hint aus der Hint- Tabelle aufrufen.
Dadurch wird es möglich, die bis dahin statischen Hints jederzeit dynamisch zu variieren, indem, ohne daß die Anwendung in irgendeiner Weise unterbrochen wird, die zugehörige Hint-Tabelle aktualisiert wird. Dadurch kann die externe Steuerung bzw. Beeinflussung des Optimierers durch Hints wesentlich schneller und einfacher den tatsächlichen Verhältnissen und Bedürfnissen angepaßt werden.Thus, the present invention contemplates that each application is allocated memory space for receiving an associated hint table, and the static hints previously embedded in program code of the application or a database query block are replaced with hint calls. which invoke a hint from the hint table specified by the call. This makes it possible to dynamically vary the hitherto static hints at any time by updating the associated hint table without interrupting the application in any way. As a result, the external control or influencing of the optimizer by Hints can be much faster and easier adapted to the actual circumstances and needs.
In der bevorzugten Ausführungsform der Erfindung ist vorgesehen, daß der Aufruf dadurch erfolgt, daß anstelle eines Hints in einer Anwendung eine Hint-Variable eingebettet ist, die entsprechend definiert ist und eine Kennung bzw. Text aufweist, durch welche der an dieser Stelle aus der Tabelle einzufügende Hint eindeutig definiert ist.In the preferred embodiment of the invention, it is contemplated that the call is made by embedding a hint variable in an application instead of a hint, which is defined accordingly and has an identifier, or text, by which at that point in the table Hint to be inserted is clearly defined.
Weiterhin ist eine Ausführungsform der Erfindung bevorzugt, bei welcher für unterschiedliche Anwendungen unabhängig und getrennt Hint-Tabellen zugeordnet sind. Dies schließt jedoch nicht aus daß eine Hinttabelle gleichzeitig zwei oder mehr verschiedenen Anwendungen zugeordnet ist, ins- besondere, wenn die Anwendungen relativ große Ähnlichkeiten aufweisen, die zu identischen oder ähnlichen Datenbankabfragen führen.Furthermore, an embodiment of the invention is preferred in which independent and separate hint tables are assigned for different applications. However, this does not exclude that a hint table is concurrently assigned to two or more different applications, especially if the applications have relatively similar similarities leading to identical or similar database queries.
Weiterhin wird zweckmäßigerweise eine Master-Tabelle von Hints im Rahmen einer zentralen Hint- Verwaltung bereitgestellt und gepflegt, wobei die jeweils einzelnen Anwendungen zugeordneten Hint-Tabellen Teilmengen der Hints aus der Master-Tabelle sind und entsprechend dem speziellen Bedarf jeder Anwendung ausgewählt werden. Auf diese Weise wird die mehrfache identische oder ähnliche Entwicklung von Hints durch verschiedene Personen vermieden, da alle für eine Vielzahl von Anwendungen in einem großen, gegebenenfalls vernetzten System wie zum Beispiel in einem "Wide Area Network" (großräumigen Netzwerk) benötigten Hints zentral verwaltet und gespeichert werden, auch wenn Teilmengen der zentralen Hinttabelle jeweils getrennt einzelnen Anwendungen zugewiesen und in den Anendungen zugeordnetem Speicherraum gespeichert sind.Furthermore, it is expedient to provide and maintain a master table of hints as part of a central hint administration, wherein the hint tables assigned to individual applications are subsets of the hints from the master table and are selected according to the specific needs of each application. In this way, the multiple identical or similar evolution of hints by different people is avoided since all are centrally managed for a variety of applications in a large, possibly networked system such as a wide area network are stored, even if subsets of the central hint table are each separately assigned to individual applications and stored in the appendices associated memory space.
Ohnehin entwickelt die vorliegende Erfindung ihre Vorzüge vor allem in Verbindung mit sehr großen Systemen, insbesondere Datenbank mit mehr als 200 GB und vorzugsweise mehr als 500 GB Spei- cherraum mit einer großen Zahl von Daten, die in einer entsprechenden Vielzahl von Tabellen oder anderen Dateien abgelegt sind. Kleinere Systeme kommen oft ohne Hints aus, wobei jedoch grundsätzlich gilt, daß die vorliegenden Erfindung umso sinnvoller und effektiver einsetzbar ist, je umfangreicher und komplexer die Datenbanken und je langsamer die verwendeten Prozessoren bzw. je geringer deren Kapazitäten sind.In any case, the present invention develops its advantages, especially in connection with very large systems, in particular a database with more than 200 GB and preferably more than 500 GB of storage space with a large number of data stored in a corresponding multiplicity of tables or other files are. Smaller systems often come without hints, but in principle it is the more useful and effective the present invention, the more extensive and complex the databases and the slower the processors used or the smaller their capacity.
Zweckmäßigerweise ist vorgesehen, daß die Hints einer Hint-Tabelle wahlweise aktiviert oder deaktiviert werden können. Dies ermöglicht insbesondere eine einfache Parametersteuerung, indem die Aktivierung oder Deaktivierung eines Hints von dem Wert eines konkreten, variablen bzw. einstellba-
- -Appropriately, it is provided that the Hints a hint table can be selectively activated or deactivated. In particular, this allows a simple parameter control by the activation or deactivation of a hint of the value of a concrete, variable or adjustable - -
ren Parameters abhängig gemacht wird. Beispielsweise ist es gemäß einer bevorzugten Variante möglich, bestimmte Hints nur für bestimmte Zeiträume zu aktivieren.dependent parameter. For example, according to a preferred variant it is possible to activate certain hints only for certain periods of time.
Darüber hinaus ist es zweckmäßig, wenn ein Dokumentationssystem vorgesehen ist, welches die zeitliche Entwicklung der einzelnen Hint-Tabellen und insbesondere der Master-Hint-Tabelle dokumentiert und archiviert.In addition, it is expedient if a documentation system is provided which documents and archives the temporal development of the individual hint tables and in particular the master hint table.
Die vorliegende Erfindung ist auch auf ein entsprechendes Verfahren gerichtet, welches ein Datenbankmanagementsystem mit mindestens einer relationalen Datenbank, mindestens einem Server und mindestens einem Client aufweist, der für Datenbankabfragen mit dem Server in Kontakt tritt, wobei das Datenbankmanagementsystem einen Optimierer aufweist, der Abläufe der Bearbeitung von Datenbankabfragen steuert und der aus Anwendungen des Clients oder Servers Hints für eine externe Steuerung verwendet. Hinsichtlich eines solchen Verfahrens ist erfindungsgemäß vorgesehen, daß anstelle eines Hints in einer Anwendung oder einem Abfragebaustein einer Anwendung ein Hint-Aufruf vorgesehen ist, durch welchen ein Hint aus einer der Anwendung zugeordneten Hint- Tabelle aufgerufen wird.The present invention is also directed to a corresponding method comprising a database management system having at least one relational database, at least one server, and at least one client contacting the server for database queries, the database management system having an optimizer of the processing flow controls database queries and uses the client's or server's applications for external control. With regard to such a method, it is provided according to the invention that instead of a hint in an application or a query module of an application, a hint call is provided by which a hint is called from a hint table assigned to the application.
Für die Speicherung der Hint-Tabelle muß der jeweiligen Anwendung entsprechender Speicherraum zugewiesen werden. Die Zugriffsrechte auf Hints und die Möglichkeiten zum Ändern von Hints kön- nen je nach Bedarf unterschiedlich vergeben werden. In der bevorzugten Ausführungsform der Erfindung wird eine zentrale Master-Hint-Tabelle von einem Administrator verwendet, der auch festlegt, welche Hints aus der Master-Hint-Tabelle zur Erzeugung der den jeweiligen Anwendungen zugeordneten, individuellen Hint-Tabellen verwendet und/oder aktiviert werden. Dabei ist es insbesondere in einfacher Weise möglich, daß unterschiedliche Anwendungen unterschiedliche Sätze und Hints in ihren jeweiligen Tabellen aufweisen, die aber sehr wohl in weiten Bereichen überlappen können und auf diese Weise entsprechende Hints nur einmal zentral erstellt werden müssen, die dann in verschiedenen Anwendungen mehrfach bzw. in gleicher Weise verwendet werden können. Gegebenenfalls können untergeordnete Operatoren oder Administratoren gewisse Zugriffsrechte auf individuelle Hint-Tabellen erhalten, die es beispielsweise ermöglichen, bestimmte Hints zu aktivieren oder zu deaktivieren oder Zeiträume der Aktivierung und Deaktivierung von Hints festzulegen. Vorzugsweise wird jedoch auch dies zentral von einem Hint-Verwaltungssystem aus vorgenommen, von welchem aus der alleinige Zugriff auf die Master-Hint-Tabelle besteht.To store the hint table, appropriate memory space must be assigned to the respective application. The access rights to hints and the options for changing hints can be assigned differently depending on requirements. In the preferred embodiment of the invention, a central master hint table is used by an administrator who also determines which hints are used and / or activated from the master hint table to generate the individual hint tables associated with the respective applications , In particular, it is possible in a simple manner that different applications have different phrases and hints in their respective tables, but which can very well overlap in a wide range and in this way corresponding Hints only once must be created centrally, which then several times in different applications or can be used in the same way. If necessary, subordinate operators or administrators may be granted certain access rights to individual hint tables, which allow, for example, certain hints to be enabled or disabled or periods of activation and deactivation of hints. Preferably, however, this is also done centrally by a hint management system from which the sole access to the master hint table exists.
Weitere Vorteile, Merkmale und Ausführungsformen der vorliegenden Erfindung werden deutlich anhand der folgenden Beschreibung eines anhand einer Figur schematisch wiedergegebenen Ausführungsbeispiels sowie anhand weiterer konkreter Beispiele aus einer gegebenen Datenbankumgebung.
- -Further advantages, features and embodiments of the present invention will become apparent from the following description of an embodiment shown schematically with reference to a figure as well as further concrete examples from a given database environment. - -
In der einzigen Figur erkennt man schematisch dargestellt ein Datenbankmanagementsystem 1 , welches unter anderem einen Optimierer 5 aufweist und welches mit einem Server 3 und einer Datenbank 2 verbunden ist. Das Datenbankmanagementsystem kann auch in den Server 3 integriert sein bzw. alle dargestellten Elemente umfassen. Der Server 3 ist wiederum mit einem Client 4 ver- bunden, wobei Server und Client gegebenenfalls auch identisch sein können. Ein Anwendungsprogramm 6 oder auch mehrere Anwendungsprogramme 6 laufen auf dem Client 4 oder auch auf dem Server 3.The single FIGURE shows schematically a database management system 1 which, inter alia, has an optimizer 5 and which is connected to a server 3 and a database 2. The database management system can also be integrated into the server 3 or comprise all elements shown. The server 3 is in turn connected to a client 4, whereby the server and client can possibly also be identical. An application program 6 or even several application programs 6 run on the client 4 or else on the server 3.
Im Falle einer Datenbankabfrage, die im Rahmen einer Anwendung 6 von dem Client 4 an den Ser- ver 3 gerichtet wird, wird das Datenbankmanagementsystem 1 aktiviert, woraufhin der Optimierer 5 die Datenbankabfrage analysiert und interpretiert und in eine konkrete Folge logischer Operationen umsetzt, um die gewünschten Daten aus der Datenbank 2 in möglichst kurzer Zeit und mit möglichst geringem Aufwand zu extrahieren. Die Datenbank 2 ist eine relationale Datenbank, die hier lediglich schematisch als ein einheitlicher Block 2 dargestellt ist, die aber tatsächlich aus einer Vielzahl ein- zelner Datenbanken bestehen kann, die auf einem Datenbankserver (nicht dargestellt) vorhanden und lokal implementiert sein können, die aber auch in Form von verteiltem Speicher vorliegen können, der unter Umständen auch Speicher von Client 4 und Server 3 umfaßt.In the case of a database query, which is directed by an application 6 from the client 4 to the server 3, the database management system 1 is activated, whereupon the optimizer 5 analyzes the database query and interprets and converts it into a concrete sequence of logical operations to the desired data from the database 2 in the shortest possible time and with the least possible effort to extract. The database 2 is a relational database, which is shown here only schematically as a uniform block 2, but which in fact can consist of a large number of individual databases which may be present on a database server (not shown) and implemented locally, but which may also be in the form of distributed memory, which may include memory of client 4 and server 3 under certain circumstances.
Der Optimierer versucht, die Reihenfolge logischer Operationen in der Weise zu steuern, daß das Ergebnis der Datenbankabfrage möglichst ökonomisch und in möglichst kurzer Zeit erzielt wird. Dem Benutzer der Anwendung 6 sind aber möglicherweise Informationen über die Datenbank bzw. über einzelne Tabellen der Datenbank 2 bekannt oder zugänglich, die der Optimierer 5 nicht zur Verfügung hat und im automatischen Betrieb nicht in die Festlegung der Steuerungsabläufe einbezieht. Ein Nutzer oder Anwender oder Administrator des Systems kann daher von der Anwendung 6 aus Hinweise oder Anweisungen in Form von sogenannten "Hints" an den Optimierer 5 geben, die gegenüber anderen von dem Optimierer ansonsten vorgesehenen oder geplanten Operationen Vorrang haben, um auf diese Weise die Wirkung des Optimierers 5 auf die Steuerung der Datenbankabfrage zu verbessern.The optimizer attempts to control the order of logical operations in such a way that the result of the database query is achieved as economically as possible and in the shortest possible time. However, information about the database or about individual tables of the database 2 may be known or accessible to the user of the application 6, which the optimizer 5 does not have available and does not involve in the definition of the control processes in automatic operation. A user or user or administrator of the system may therefore provide hints or instructions to the optimizer 5 from the application 6, which override other operations otherwise provided or planned by the optimizer, in this way Optimizer 5's effect on database query control.
Gemäß der vorliegenden Erfindung sind jedoch die Hints nicht als solche in die Anwendung 6 oder entsprechende Bausteine, welche eine Datenbankabfrage auslösen, eingebunden, sondern die Anwendung 6 enthält vielmehr lediglich Aufrufe entsprechender Hints, die in einer der Anwendung 6 zugeordneten Hint-Tabelle 7 abgelegt sind. Bei der Bearbeitung der Datenbankabfrage und der Optimierung der entsprechenden logischen Abläufe ruft der Optimierer 5 daher entsprechend den mit der Datenbankabfrage von der Anwendung 6 empfangene Hint-Aufrufe die entsprechenden Hints aus der Hint-Tabelle 7 auf und integriert sie entsprechend den Hint-Vorgaben in die Abarbeitung bzw. die Zeit- oder Rangfolge der im Rahmen der Datenbankabfrage durchgeführten Suchläufe.
Erfindungsgemäß ist zusätzlich ein Hint-Managementsystem vorgesehen, welches eine Master- H int- Tabelle 9 erstellt, pflegt und aktualisiert und welches aus der Master-Hint-Tabelle die individuellen Hint-Tabellen 7 generiert. Es versteht sich, daß die Anwendung 6 und die Hint-Tabelle 7 im vorliegenden Fall nur beispielhaft für eine Vielzahl möglicher Anwendungen mit zugeordneten Hint- Tabellen steht, wobei auch die Zahl der Clients und Server prinzipiell beliebig sein kann und das gesamte System Teil eines größeren Netzwerks sein kann, ebenso wie dies oben bereits für die Datenbank 2 beschrieben wurde. Es versteht sich, daß die Vorteile der vorliegenden Erfindung insbesondere bei sehr umfangreichen Datenbanken zum Tragen kommen, die z.B. mehr als 500 Gigabyte Speicher in einer Vielzahl unterschiedlicher Tabellen umfassen. Bei sehr komplexen und zer- splitterten Datenbanken und bei einem relativ langsam arbeitenden Datenbankmanagementsystem bzw. Server kann aber das System auch schon bei geringeren Speichergrößen von z.B. 100 bis 200 Gigabyte zu einer spürbaren Beschleunigung in der Bearbeitung von Datenbankabfragen führen.According to the present invention, however, the hints are not included as such in the application 6 or corresponding building blocks that trigger a database query, but rather the application 6 only contains calls of corresponding hints stored in a hint table 7 associated with the application 6 , When processing the database query and the optimization of the corresponding logical operations, the optimizer 5 therefore calls according to the received with the database query from the application 6 Hin calls the Hints from the hint table 7 and integrates them according to the hint specifications in the Processing or the time or ranking of the searches carried out in the context of the database query. According to the invention, a hint management system is additionally provided which creates, maintains and updates a master H int table 9 and which generates the individual hint tables 7 from the master hint table. It is understood that the application 6 and the hint table 7 in the present case is only an example of a variety of possible applications with associated hint tables, wherein the number of clients and servers in principle can be arbitrary and the entire system part of a larger Network as described above for database 2. It should be understood that the benefits of the present invention will be particularly apparent in very large databases that include, for example, more than 500 gigabytes of memory in a variety of different tables. With very complex and fragmented databases and with a relatively slow-running database management system or server, however, the system can already lead to a noticeable acceleration in the processing of database queries even with smaller memory sizes of eg 100 to 200 gigabytes.
Im folgenden werden noch zwei Ausführungsbeispiele der vorliegenden Erfindung anhand zweier Beispiele beschrieben, wobei zunächst nochmals das Wesen der Hint- Verarbeitung erläutert wird.In the following two embodiments of the present invention will be described with reference to two examples, wherein first again the nature of Hint processing will be explained.
Hint-VerarbeitungHint processing
Hints sind in SQL-Code eingebettete Anweisungen für den Oracle-Optimizer, die den Ausführungs- plan von SQL-Statements beeinflussen. Die Benutzung von Hints ist dann zwingend notwendig, wenn fachliches Wissen in die Ausführung von SQL-Statements fließen soll. Woher soll der Optimi- zer z. B. wissen, daß ein Index mit dem Feld Fehlerkennzeichen für den Fall "Ja" hoch selektiv, für den Fall "Nein" aber überhaupt nicht selektiv ist. Hints sind weiterhin dann nötig, wenn der Optimizer - aus welchen Gründen auch immer - nicht den gewünschten / optimalen Ausführungsplan nimmt.Hints are SQL-embedded instructions for the Oracle Optimizer that affect the execution plan of SQL statements. The use of hints is imperative if technical knowledge should flow into the execution of SQL statements. How should the optimizer z. For example, you know that an index with the field Error flag is highly selective for the case "Yes", but not selective at all for the case "No". Hints are still necessary if the optimizer - for whatever reason - does not take the desired / optimal execution plan.
Um dynamisch (d.h. ohne Programmanpassungen) Hints ändern zu können, ist eine über Stammdatentabellen steuerbare Hint-Verwaltung entwickelt worden. Zur Benutzung dieser Hint- verwaltung müssen die Aufrufstellen der Datenbankanforderungen in einem Programm eindeutig identifizierbar sein (z.B. durch eindeutige Nummerierung oder Auslagerung in Programmmo- dule mit eindeutig zugeordnetem Namen). Diese Eindeutigkeit ist notwendig, damit aus den Stammdatentabellen der Hintverwaltung der jeweils zugehörige Hintdatensatz gezogen werden kann, der anschließend über eine Programmvariable an das Datenbankanforderungsstatement übergeben werden kann. Am Beispiel einer Implementierung in der SAP Programmiersprache ABAP wird die Hintbenutzung nachfolgend aufgezeigt. Hierbei sind die Datenbankanforde- rungszugriffe in modularisierte Einheiten (Funktionsbausteine) ausgelagert.To dynamically (i.e., without program adjustments) change, a Hint management controllable via master data tables has been developed. To use this hint management, the database request invocations must be uniquely identifiable in a program (e.g., by unique numbering or paging in program modules with a unique name). This uniqueness is necessary so that the respective hint data record can be drawn from the master data tables of the hint administration, which can then be transferred to the database request statement via a program variable. Using the example of an implementation in the SAP programming language ABAP, the hint usage is shown below. Here, the database request accesses are outsourced in modularized units (function modules).
* Beginn der Definition des Funktionsbausteins FUNCTION TABELLE READ TABLE
* Datendeklaration eine 40stelligen Charactervariablen, die den Hinttext aufnimmt DATA: vl_hint_text(40) type c. * Start of the definition of the function block FUNCTION TABLE READ TABLE * Data declaration a 40-character character variable that takes the hint text DATA: vl_hint_text (40) type c.
* Aufruf der Prozedur (ABAP Macro) get-hint für die Hintermittlung * Call the procedure (ABAP Macro) get-hint for the determination
* durch die Übergabe der Variablen cl_objname vp_sel_num und vp_num wird die * by passing the variables cl_objname vp_sel_num and vp_num the
* Aufrufstelle der * Call office of the
* Datenbankanforderung eindeutig identifiziert get-hint cl_objname vp_sel_num vp_num vl_hint_text * Database Request uniquely identified get-hint cl_objname vp_sel_num vp_num vl_hint_text
* dynamisch ermittelter Hinttext im SELECT Statement einbauen. Dadurch übergibt die * insert dynamically determined hint text in the SELECT statement. This passes the
* SAP-Datenbankschnittstelle den Hinttext an die Datenbank * SAP database interface the hint text to the database
* (hier z.B. ORACLE Datenbanksystem) select * from TABLE where ... %_hints oracle vl_hint_text * (here eg ORACLE database system) select * from TABLE where ...% _hints oracle vl_hint_text
Ob Hints tatsächlich benötigt werden, wird während der Entwicklung, im Test oder im produktiven Einsatz festgestellt. Die entsprechende Pflege der Hintstammdaten erfolgt z.B. durch die Datenbankadministratoren oder die technischen Betreuer der Anwendungen. Ist für eine Aufruf- stelle einer Datenbankanforderung kein Hint in der Hinttabelle eingetragen, bewirkt das Einfügen des Hinttextes %_hints keine Änderung des Datenbank-Zugriff.Whether hints are actually needed is determined during development, in the test or in productive use. The corresponding maintenance of the hint master data takes place, for example. by the database administrators or the technical maintainers of the applications. If no hint is entered in the hint table for a database request call, inserting the back text% _hints does not change the database access.
Um dynamisch (d.h. ohne Programmanpassungen) Hints ändern zu können, ist eine über Stammdatentabellen steuerbare Hint-Verwaltung entwickelt worden. Zur Benutzung dieser Hint-Verwaltung sind folgende ABAP-Statements in den DB-Zugriffsbausteinen zu implementieren:To dynamically (i.e., without program adjustments) change, a Hint management controllable via master data tables has been developed. To use this hint administration, the following ABAP statements must be implemented in the DB access blocks:
* Deklaration einer Variablen vl_hint_text: DATA: vl_hint_text like /lrs/sθθshint-hint_text.* Declaration of a variable vl_hint_text: DATA: vl_hint_text like / lrs / sθθshint-hint_text.
* Aufruf des Makros get-hint get-hint cl_objname vp_whenum '00' vl_hint_text* Call the macro get-hint get-hint cl_objname vp_whenum '00' vl_hint_text
* Evtl. Aufruf des Macros get-hint-from-itab get-hint-from-itab vl_select_nummer vl_lauf_nummer vl_hint_text* Possibly. Calling the macro get-hint-from-itab get-hint-from-itab vl_select_number vl_flow_number vl_hint_text
* Hint-Text im SELECT einbauen* Insert hint text in the SELECT
• select * from tabname where ... %_hints oracle vl_hint_text• select * from tabname where ...% _hints oracle vl_hint_text
Bei der Entwicklung neuer DB-Zugriffsbausteine ist die Benutzung der dynamischen Hint-Verwaltung Pflicht. Dabei ist das Macro get-hint standardmäßig mit der Select-Nummer '00' (3. Übergabeparameter) aufzurufen. Dieser Aufruf findet pro Funktionsbaustein genau einmal zu Beginn statt und füllt
eine interne Tabelle mit allen Hint-Texten für diese When-Nummer und speziell die Variable vl_hint_text mit dem Hint-Text für den Standardfall '00' '01 '. Weitere Hint-Text Selektionen für diese When-Nummer finden dann bei Bedarf nur noch über das Macro get-hint-from-itab (siehe unten) statt.When developing new DB access blocks, the use of dynamic hint management is mandatory. The macro get-hint is called by default with the select number '00' (3rd transfer parameter). This call takes place once per function module and fills an internal table with all hint texts for this when number and especially the variable vl_hint_text with the hint text for the default case '00''01'. Further hint text selections for this when number will only be available via the macro get-hint-from-itab (see below).
Ob Hints tatsächlich benötigt werden, wird während der Entwicklung, im Test oder im produktiven Einsatz festgestellt. Die entsprechende Pflege der Hint-Stammdaten erfolgt durch DP/AI. Ist für eine bestimmte When-Nummer kein Stammdaten-Eintrag vorhanden, bewirkt das Einfügen des Hint- Textes (%_hint...) im Select-Statement keine Änderung beim DB-Zugriff.Whether hints are actually needed is determined during development, in the test or in productive use. The corresponding maintenance of the Hint master data is done by DP / AI. If there is no master data entry for a particular when number, inserting the hint text (% _hint ...) in the select statement does not change the DB access.
Beispiel 1 (Standardfall):Example 1 (standard case):
FUNCTION /LRS/USTC01_READ_TABLE constants: cl_objname(9) type c value 'USTC01_RT'. data vl_hint_text like /lrs/sθθshint-hint_text.FUNCTION / LRS / USTC01_READ_TABLE constants: cl_objname (9) type c value 'USTC01_RT'. data vl_hint_text like / lrs / sθθshint-hint_text.
Hint Text abholen get-hint cl_objname vp_whenum 1OO' vl_hint_text.Get hint text get-hint cl_objname vp_whenum 1 OO 'vl_hint_text.
* welchen Select nehmen ? case vp_whenum. * which select to take? case vp_whenum.
when 1.when 1.
select * into corresponding fields of table tp_ustcO1 from /Irs/sOObustcselect * into corresponding fields of table tp_ustcO1 from / irs / sOObustc
%_hints oracle vl_hint_text.% _hints oracle vl_hint_text.
Beispiel 2 : 2 Hints für ein Select innerhalb einer When-Nummer.Example 2: 2 hints for a select within a when number.
Falls in einem Select-Statement unterschiedliche Hints in Abhängigkeit von der Datenkonstellation eingesetzt werden müssen, wird zuerst das Macro get-hint wie oben beschrieben aufgerufen. Abhängig von der Datenkonstellation wird dann mit dem Macro get-hint-from-itab unter Angabe der entsprechenden Select- (1. Parameter) und laufenden Nummer (2. Parameter) der gewünschte Hint- Text bereitgestellt.If different hints have to be used in a select statement depending on the data constellation, the macro get-hint is called first as described above. Depending on the data constellation, the desired hint text is provided with the macro get-hint-from-itab specifying the appropriate select (1st parameter) and consecutive number (2nd parameter).
function /Irs/cova01_read_table.function / irs / cova01_read_table.
constants:
cl_objname(9) type c value 'COVA01_RT'.constants: cl_objname (9) type c value 'COVA01_RT'.
data : vl_hint_text like /lrs/sθθshint-hint_text.data: vl_hint_text like / lrs / sθθshint-hint_text.
* Standard auf ruf des Makros get-hint cl_objname vp_whenum 1OO' vl_hint_text. * Default on macro call get-hint cl_objname vp_whenum 1 OO 'vl_hint_text.
* welchen Select nehmen ? case vp_whenum. * which select to take? case vp_whenum.
when δl if vp_sel_bpsaaid_btva > 0.when δl if vp_sel_bpsaaid_btva> 0.
* Makro get-hint-from-itab aufrufen mit laufender Nummer 02 get-hint-from-itab 1OO' '02' vl_hint_text. endif. select * from /Irs/s00bcova appending table tp_cova01 where custaid = vp_sel_cltaid * Call macro get-hint-from-itab with serial number 02 get-hint-from-itab 1 OO '' 02 'vl_hint_text. endif. select * from / irs / s00bcova appending table tp_cova01 where custaid = vp_sel_cltaid
%_hints oracle vl_hint_text.% _hints oracle vl_hint_text.
Beispiel 3 : mehrere Hints für mehrere Selects innerhalb einer When-Nummer.Example 3: Multiple hints for multiple selects within a when number.
Falls innerhalb einer When-Nummer mehrere Selects (für unterschiedliche oder gleiche Tabellen) auftreten, wird zuerst das Macro get-hint wie oben beschrieben aufgerufen. Für jedes Select wird dann mit dem Macro get-hint-from-itab unter Angabe der entsprechenden Select- (1. Parameter) und laufenden Nummer (2. Parameter) der gewünschte Hint-Text bereitgestellt.If several selects (for different or the same tables) occur within a When number, the macro get-hint is called first as described above. For each Select, the desired hint text is provided with the get-hint-from-itab macro, specifying the appropriate Select (1st parameter) and consecutive number (2nd parameter).
function /Irs/agnt91_read_table.function / irs / agnt91_read_table.
Consta nts: cl_objname(9) type c value 'AGNT91_RT'.Constant: cl_objname (9) type c value 'AGNT91_RT'.
data : vl_hint_text like /lrs/sθθshint-hint_text.data: vl_hint_text like / lrs / sθθshint-hint_text.
* Standard auf ruf des Makros get-hint cl_objname vp_whenum '00' vl_hint_text. * Default on macro of the get-hint cl_objname vp_whenum '00' vl_hint_text.
* welchen Select nehmen ? case vp_whenum. * which select to take? case vp_whenum.
When 10.
* Makro get-hint-from-itab aufrufen mit Select-Nummer 00 get-hint-from-itab 1OO' '01'When 10. * Call macro get-hint-from-itab with select number 00 get-hint-from-itab 1 OO '' 01 '
(eigentlich nicht notwendig, da vl_hint_text schon durch Aufruf get-hint richtig gefüllt)(actually not necessary, because vl_hint_text already filled correctly by calling get-hint)
.Select * from /LRS/S00SCARR Where ....Select * from / LRS / S00SCARR Where ...
%_HINTS ORACLE VL_HINT_TEXT% _HINTS ORACLE VL_HINT_TEXT
* Makro get-hint-from-itab aufrufen mit Select-Nummer 01 get-hint-from-itab '01 ' '01' (füllt vl_hint_text für Select-Nummer 01 , laufende Nummer 01. * Call macro get-hint-from-itab with select-number 01 get-hint-from-itab '01 '' 01 '(fills vl_hint_text for select number 01, serial number 01.
Select * from /LRS/S00SADRSSelect * from / LRS / S00SADRS
Where ... (Ergebnisse aus select 1 )Where ... (results from select 1)
%_HINTS ORACLE VL_HINT_TEXT% _HINTS ORACLE VL_HINT_TEXT
When 1 1.
When 1 1.
Claims
1. System zur automatischen Optimierung der Anfragebearbeitung in Datenbank- bzw Datenbankmanagementsystemen (1 ) mit mindestens einer relationalen Datenbank (2), mindestens einem Server (3) und mindestens einem Client (4), der für Datenzugriffsanforderungen mit dem Server in Kommunikationsverbindung tritt, wobei das Datenbankmanagementsystem (1 ) einen Optimierer (5) aufweist, der Abläufe von Datenzugriffsanforderungen steuert und der Hints aus Anwendungen (6) des Clients (4) oder des Servers (3) für eine externe Steuerung des Optimierers (5) verwendet, dadurch gekennzeichnet, daß mindestens einer Anwendung (6) Speicherraum für eine Hint-Tabelle (7) zugeordnet ist und daß anstelle eines Hint in der Anwendung bzw. in einem Baustein einer Datenzugriffsanforderung ein Hint- Aufruf vorgesehen ist, durch welchen ein Hint aus der in dem Speicher gespeicherten Hint- tabelle (7) zur externen Steuerung des Optimierers (5) aufgerufen wird.A system for automatically optimizing request processing in database or database management systems (1) having at least one relational database (2), at least one server (3) and at least one client (4) communicating with the server for data access requests, wherein the database management system (1) comprises an optimizer (5) which controls operations of data access requests and which uses hints from applications (6) of the client (4) or the server (3) for external control of the optimizer (5), characterized that at least one application (6) is allocated memory space for a hint table (7) and that instead of a hint in the application or in a block of a data access request, a hint call is provided, by which a hint is stored from the memory stored in the memory Hint table (7) for external control of the optimizer (5) is called.
2. System nach Anspruch 1 , dadurch gekennzeichnet, daß der Hint-Aufruf eine in der Anwendung bzw. dem Datenzugriffsbaustein definierte Variable ist.2. System according to claim 1, characterized in that the hint call is a variable defined in the application or the data access block.
3. System nach Anspruch 1 oder 2, dadurch gekennzeichnet, daß für unterschiedliche Anwendungen getrennte Hint-Tabellen (7) vorgesehen sind.3. System according to claim 1 or 2, characterized in that separate hint tables (7) are provided for different applications.
4. System nach einem der Ansprüche 1 bis 3, dadurch gekennzeichnet, daß eine Hint- Verwaltung (8) vorgesehen ist, welcher eine Master-Hint-Tabelle zugeordnet ist, die über die Hint-Verwaltung gepflegt wird, wobei die Hint-Tabelle (7) einer Anwendung (6) mindestens eine Teilmenge der Master-Hint-Tabelle (9) umfaßt.4. System according to one of claims 1 to 3, characterized in that a hint management (8) is provided, which is associated with a master hint table, which is maintained via the hint management, wherein the hint table ( 7) an application (6) comprises at least a subset of the master hint table (9).
5. System nach einem der Ansprüche 1 bis 4, dadurch gekennzeichnet, daß die Hint-Tabelle (7) eine Anwendung (6) und/oder die Master-Hint-Tabelle (9) einer Hint-Verwaltung (8) wäh- rend des laufenden Betriebs einer Anwendung (6) veränderbar sind.5. System according to one of claims 1 to 4, characterized in that the hint table (7) an application (6) and / or the master hint table (9) of a hint management (8) during the ongoing operation of an application (6) are changeable.
6. System nach einem der Ansprüche 1 bis 5, dadurch gekennzeichnet, daß die Hints einer Hint-Tabelle individuell aktivierbar und deaktivierbar sind.6. System according to any one of claims 1 to 5, characterized in that the Hints a hint table are individually activated and deactivated.
7. System nach Anspruch 6, dadurch gekennzeichnet, daß die Hints über einstellbare Parameter aktivierbar und deaktivierbar sind, wobei die Parameter mindestens einen Parameter für einen Gültigkeitszeitraum eines Hints umfassen. 7. System according to claim 6, characterized in that the hints can be activated and deactivated via adjustable parameters, wherein the parameters comprise at least one parameter for a validity period of a Hints.
8. System nach einem der Ansprüche 1 bis 7, dadurch gekennzeichnet, daß die Hint- Verwaltung ein Dokumentationssystem aufweist, welches die zeitliche Entwicklung sowohl der Master-Hint-Tabelle (9) als auch der Hint-Tabellen (7) der Anwendungen (6) dokumentiert.8. System according to any one of claims 1 to 7, characterized in that the Hint management has a documentation system which the temporal evolution of both the master hint table (9) and the hint tables (7) of the applications (6 ).
9. Verfahren zum Optimieren von Datenbankabfragen in einem Datenbankmanagementsystem nach einem der Ansprüche 1 bis 8, dadurch gekennzeichnet, daß in den Programmcode einer Anwendung mindestens Hintaufruf integriert ist, durch welchen im Falle von Datenbankabfragen über die Anwendung zur Optimierung der Bearbeitung der Datenbankabfrage ein Hlnt aus einer außerhalb des Programmcodes gespeicherten, der Anwendung zugeordneten9. A method for optimizing database queries in a database management system according to one of claims 1 to 8, characterized in that in the program code of an application at least call is integrated, through which in the case of database queries on the application for optimizing the processing of the database query a Hlnt from a stored outside the program code, the application assigned
Hinttabelle aufgerufen und verarbeitet wird.Hint table is called and processed.
10. Verfahren nach Anspruch 9, dadurch gekennzeichnet, daß der Hintaufruf über eine in den Programmcode integrierte, definierte Hlntvariable erfolgt. 10. The method according to claim 9, characterized in that the call is made via a built-in program code, defined Hlntvariable.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE102006017076.8A DE102006017076B4 (en) | 2006-04-10 | 2006-04-10 | Automatic optimization of query processing in database systems |
DE102006017076.8 | 2006-04-10 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2007115847A1 true WO2007115847A1 (en) | 2007-10-18 |
Family
ID=37908138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/EP2007/051296 WO2007115847A1 (en) | 2006-04-10 | 2007-02-09 | Automatic optimisation of request processing in databank systems |
Country Status (2)
Country | Link |
---|---|
DE (1) | DE102006017076B4 (en) |
WO (1) | WO2007115847A1 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6345266B1 (en) * | 1998-12-23 | 2002-02-05 | Novell, Inc. | Predicate indexing for locating objects in a distributed directory |
US20040019587A1 (en) * | 2002-07-25 | 2004-01-29 | You-Chin Fuh | Method and device for processing a query in a database management system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6813617B2 (en) * | 1998-10-05 | 2004-11-02 | Oracle International Corporation | Dynamic generation of optimizer hints |
US7139749B2 (en) * | 2002-03-19 | 2006-11-21 | International Business Machines Corporation | Method, system, and program for performance tuning a database query |
US20050138015A1 (en) * | 2003-09-06 | 2005-06-23 | Oracle International Corporation | High load SQL driven statistics collection |
US7444389B2 (en) * | 2003-12-09 | 2008-10-28 | Emc Corporation | Methods and apparatus for generating a content address to indicate data units written to a storage system proximate in time |
-
2006
- 2006-04-10 DE DE102006017076.8A patent/DE102006017076B4/en active Active
-
2007
- 2007-02-09 WO PCT/EP2007/051296 patent/WO2007115847A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6345266B1 (en) * | 1998-12-23 | 2002-02-05 | Novell, Inc. | Predicate indexing for locating objects in a distributed directory |
US20040019587A1 (en) * | 2002-07-25 | 2004-01-29 | You-Chin Fuh | Method and device for processing a query in a database management system |
Also Published As
Publication number | Publication date |
---|---|
DE102006017076A1 (en) | 2007-10-11 |
DE102006017076B4 (en) | 2020-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE69934894T2 (en) | METHOD AND DEVICE FOR OPTIONALLY ADJUSTING ACCESS TO APPLICATION FEATURES | |
DE3781577T2 (en) | MANAGEMENT OF THE SIZE AND NUMBER OF MEMORY SEGMENTS ASSIGNED TO THE PROCESSES IN A CONFIGURATION FOR MULTIPLE PROCESSING. | |
DE69502381T2 (en) | METHOD AND DEVICE FOR CONTROLLING ACCESS TO A DATABASE | |
DE4218025C2 (en) | Apparatus and method for automatically associating data storage devices in a computer system | |
EP0910829B1 (en) | Database system | |
EP0829046B1 (en) | Method and system for setting up user programs as well as user computer in a computer net | |
DE10210280B4 (en) | Controls, tools and these comprehensive systems | |
DE10048942A1 (en) | Software product maintaining method in client computer system, by downloading data required for software maintenance from local memory and another memory during execution of software maintenance at client system | |
EP1637955A1 (en) | Generation of anonymized data sets for testing and developping applications | |
DE69723500T2 (en) | Data quality management system | |
DE602005002062T2 (en) | Optimization of locking granularity by means of range locks | |
DE102006017076B4 (en) | Automatic optimization of query processing in database systems | |
EP1638028A2 (en) | Computer aided generation and change management for user interfaces | |
WO2012022378A1 (en) | Method and arrangement for planning and/or programming a project of an industrial automation arrangement | |
EP1027646A1 (en) | Method for configuring data processing equipment | |
DE102019118757B4 (en) | Method for establishing cache coherence in multi-core processors | |
DE10257436A1 (en) | Customized/personalized document production method for customer at point-of-need, involves merging data of customer with intelligent template to create intelligent document | |
DE19951756B4 (en) | Data management method and computer program and system for executing it | |
EP4246326B1 (en) | Method, apparatus and system for real-time process monitoring | |
EP4329267A1 (en) | Method and system arrangement for decentralised data distribution depending on a data identifier description | |
DE10139761B4 (en) | Computer arrangement in the form of a client / server system with a file of a markup language for the parameterization of an automatic query and corresponding method | |
CH720185A2 (en) | Procedure for writing records to a relational database | |
DE102006037968B4 (en) | Universal and extensible data management with observation and inter-process communication mechanisms | |
EP4102378A1 (en) | Method for the reorganisation and/or transformation of data | |
EP4329266A1 (en) | Method and system arrangement for geolocation of data sets |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 07704509 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 07704509 Country of ref document: EP Kind code of ref document: A1 |