DE102006017076A1 - Automatic optimization of query processing in database systems - Google Patents
Automatic optimization of query processing in database systems Download PDFInfo
- Publication number
- DE102006017076A1 DE102006017076A1 DE102006017076A DE102006017076A DE102006017076A1 DE 102006017076 A1 DE102006017076 A1 DE 102006017076A1 DE 102006017076 A DE102006017076 A DE 102006017076A DE 102006017076 A DE102006017076 A DE 102006017076A DE 102006017076 A1 DE102006017076 A1 DE 102006017076A1
- Authority
- DE
- Germany
- Prior art keywords
- hint
- database
- application
- hints
- optimizer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012545 processing Methods 0.000 title claims abstract description 12
- 238000005457 optimization Methods 0.000 title abstract description 4
- 238000000034 method Methods 0.000 claims abstract description 16
- 238000011161 development Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 abstract description 5
- 230000006978 adaptation Effects 0.000 abstract description 3
- 230000008859 change Effects 0.000 description 6
- 238000012423 maintenance Methods 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000003780 insertion Methods 0.000 description 2
- 230000037431 insertion Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 125000002066 L-histidyl group Chemical group [H]N1C([H])=NC(C([H])([H])[C@](C(=O)[*])([H])N([H])[H])=C1[H] 0.000 description 1
- 230000003213 activating effect Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 238000013479 data entry Methods 0.000 description 1
- 230000009849 deactivation Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004886 process control Methods 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 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
Abstract
Die vorliegende Erfindung betrifft ein 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. Des Weiteren betrifft die vorliegende Erfindung ein Verfahren zum Optimieren von Datenbankabfragen in einem solchen Datenbankmanagementsystem. Um ein System und ein Verfahren zu schaffen, welche eine wesentlich schnellere und einfachere Anpassung der Optimierung von Datenbankzugriffsanforderungen bzw. Datenbankabfragen erlauben, wird hinsichtlich des Systems erfindungsgemäß vorgeschlagen, dass mindestens einer Anwendung (6) Speicherraum für eine Hint-Tabelle (7) zugeordnet ist und dass 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 Hinttabelle (7) zur externen Steuerung des Optimierers (5) aufgerufen wird. Hinsichtlich des Verfahrens wird vorgeschlagen, dass in den Programmcode einer Anwendung mindestens ein Hintaufruf integriert ist, durch welchen im ...The invention relates to a system for automatically optimizing query processing in database or database management systems (1) with at least one relational database (2), at least one server (3) and at least one client (4), which is used for data access requests with the server in Communication connection occurs, the database management system (1) having an optimizer (5) that controls the processes of data access requests and uses hints from applications (6) of the client (4) or the server (3) for external control of the optimizer (5) , Furthermore, the present invention relates to a method for optimizing database queries in such a database management system. In order to create a system and a method which allow a considerably faster and easier adaptation of the optimization of database access requests or database queries, the system proposes according to the invention 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 module of a data access request, a hint call is provided, by means of which a hint from the hint table (7) stored in the memory is called for external control of the optimizer (5). With regard to the method, it is proposed that at least one call-up is integrated in the program code of an application, by means of which ...
Description
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 The present invention relates to a system and a method to optimize query processing in database management systems with at least one relational database, at least one server and at least one client responsible for data access requests communicates with the server, using the database management system an optimizer, the flows of data access requests controls and hints from client or server applications for external control used by the optimizer.
Entsprechende Optimierungssysteme und entsprechende Verfahren für den Ablauf von Datenzugriffsanforderungen 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 Tabelle 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 seiner 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.Appropriate Optimization systems and corresponding procedures for the process of data access requests or database queries are from the Prior art in particular for the management and access of large databases known. Such a system is, for example, the Oracle database system, which is a standard query language (SQL - Standard Query Language) supported and uses an optimizer which controls the processing or the process controls database access requests or database queries, the optimizer as well Hints supported. Hints are instructions to the optimizer, regardless of one of the optimizers otherwise provided sequence of a database query at least in Share a specific, given by the hint flow control make. For example, could a database query a more or less complex combination the data require different tables, with the speed and efficiency of the resulting query results from the Order depends in which respective tables or their data are combined or compared. The optimizer used for the controller the procedure general criteria, such. the relative scope the tables to make a certain order of the combinations. In contrast, the user or programmer of a particular application be known that a Query criterion especially with respect to a specific table is highly selective, but according to the scheme used by the optimizer would have a subordinate ranking. A hint can be used to instruct the optimizer when editing To start the query with the table for which a query criterion is highly selective is, resulting in a significant acceleration in editing the entire data query can. Such Hints are therefore by a programmer or a correspondingly experienced user from his / her special knowledge an application and the tables to which the specific application in the case of database queries can access the program code an application or corresponding database query blocks an application inserted.
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 Dienstleistungsangebote 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.There However, both the specific applications and the sought Data containing files or tables in terms of scope and Change content significantly can, is at least from time to time a corresponding adaptation of such Hints required. Likewise new database queries due to changing or new applications or because of new service offerings the development and the Require use of new hints. However, this requires interruptions the expiration of the application, since a change from hints immediately is intervened in 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.Furthermore must do this in the case of a variety of different applications regularly and independently for all Applications are repeated, sometimes in different Applications used Hints can be 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 Neuinstallation 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 appropriate maintenance of applications including embedded therein Hints is relatively time-consuming and costly, especially if an application program is very extensive and simultaneous from a big one Number of users is used, whose work is appropriate for one Maintenance and care of the application program must be interrupted. alternative must have one such care outside usual Operating times are made. However, there are applications in the Run 24-hour operation and in particular also applications that run in globally networked systems, so that an interruption of the operation, and if only for reinstalling or supplementing the hints with patches or the like, in any case consuming and expensive and with inconvenience for the user is connected.
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 schnellere und einfachere Anpassung der Optimierung von Datenbankzugriffsanforderungen bzw. Datenbankabfragen erlauben.Opposite this The prior art is based on the object of the present invention to provide a system and a method of the type mentioned, which is a much faster and easier adaptation of the optimization allow 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 which calls a hint 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 Programmcode 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.Therefore For example, the present invention contemplates that each application requires storage space or storage space for the recording is associated with an associated hint table, and the previously in program code of the application or a building block for database queries embedded, static hints are replaced by hint calls, one closer by calling designated hint from the hint table call.
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.Thereby will it be possible to vary the hitherto static hints dynamically at any time, by, without the Application is interrupted in any way, the associated hint table is updated. This allows the external control or influence the optimizer by Hints much faster and easier actual conditions and needs customized become.
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 The invention provides that the call is made by that instead a hint in an application a hint variable is embedded which is defined accordingly and has an identifier or text, through which the hint to be inserted from the table at this point 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, insbesondere, wenn die Anwendungen relativ große Ähnlichkeiten aufweisen, die zu identischen oder ähnlichen Datenbankabfragen führen.Farther is an embodiment of the invention, in which for different applications independently and separated hint tables are assigned. This concludes, however not from one Rear table at the same time two or more different applications is assigned, in particular, if the applications have relatively large similarities have identical or similar database queries to lead.
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.Farther is expediently a master table provided by Hints as part of a central hint management and maintained, with the respective individual applications assigned Hin tables are subsets of hints from the master table and be selected according to the specific needs of each application. In this way, the multiple becomes identical or similar Development of hints avoided by different persons, since all for a variety of applications in a large, possibly networked System such as in a "Wide Area Network" (large-scale network) needed Hints centrally managed and stored, even if subsets of central hint table 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 Speicherraum 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.anyway In particular, the present invention develops its advantages in connection with very large systems, especially database with more than 200 GB and preferably more as a 500GB of storage space with a large amount of data in a corresponding variety of tables or other files are stored. Smaller systems often come without hints, whereby however basically applies that the present invention more useful and effective is, the more extensive and complex the databases and the slower the processors used or the smaller their capacities.
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. einstellbaren Parameters abhängig gemacht wird. Beispielsweise ist es gemäß einer bevorzugten Variante möglich, bestimmte Hints nur für bestimmte Zeiträume zu aktivieren.Appropriately, is provided that the Optionally, a hint table can be enabled or disabled can. this makes possible in particular a simple parameter control, by activating or Deactivating a hint from the value of a concrete, variable or adjustable parameter. For example is it according to one preferred variant possible, certain hints only for certain periods to activate.
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.Furthermore it is useful if a documentation system is provided, which the temporal development the individual hint tables and in particular the master hint table documented and archived.
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 The present invention is also related to a corresponding method which is a database management system with at least a relational database, at least one server and at least a client that is responsible for Database queries come into contact with the server, using the database management system an optimizer, the processes of processing database queries Controls and applications from the client or server hints for an external Control used. With regard to such a method, the invention provides that instead a hint in an application or a query building block of a Application a hint call is provided, through which a hint is called from a hint table associated with 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önnen 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 fest legt, 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.For storage of the hint table, the respective application must have corresponding memory space be assigned to. The access rights to hints and the options for changing hints can be assigned differently depending on your needs. In the preferred embodiment of the invention, a central master hint table is used by an administrator who also determines which hint from the master hint table is used and / or activated to generate the individual hint tables associated with the respective applications become. 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 The present invention will be apparent from the following Description of a schematically reproduced with reference to a figure embodiment as well as other concrete examples from a given database environment.
In
der einzigen Figur erkennt man schematisch dargestellt ein Datenbankmanagementsystem
Im
Falle einer Datenbankabfrage, die im Rahmen einer Anwendung
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
Gemäß der vorliegenden
Erfindung sind jedoch die Hints nicht als solche in die Anwendung
Erfindungsgemäß ist zusätzlich ein
Hint-Managementsystem vorgesehen, welches eine Master-Hint-Tabelle
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 are still two embodiments of the present invention with reference to two examples, being first again the nature of hint processing is explained.
Hint-VerarbeitungHint processing
Hints sind in SQL-Code eingebettete Anweisungen für den Oracle-Optimizer, die den Ausführungsplan 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 statements embedded in SQL code for the Oracle Optimizer, the the execution plan of Influence SQL statements. The use of Hints is then mandatory necessary if technical knowledge should flow into the execution of SQL statements. How should the Optimi zer z. For example, you know that an index with the field Error Flag for the Case "yes" highly selective, in the case of "no" but at all is not selective. Hints are still necessary if the optimizer - from which establish always - not the desired / optimal execution plan takes.
Um dynamisch (d.h. ohne Programmanpassungen) Hints ändern zu können, ist eine über Stammdatentabellen steuerbare Hint-Verwaltung entwickelt worden. Zur Benutzung dieser Hintverwaltung müssen die Aufrufstellen der Datenbankanforderungen in einem Programm eindeutig identifizierbar sein (z.B. durch eindeutige Nummerierung oder Auslagerung in Programmmodule 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 Datenbankanforderungszugriffe in modularisierte Einheiten (Funktionsbausteine) ausgelagert.Around Dynamic (that is, without program customizations) To change hints is one about master data tables controllable hint administration has been developed. To use this Hintverwaltung need the call points of the database requests in a program uniquely be identifiable (e.g., by unique numbering or paging in program modules with a unique name). This uniqueness is necessary so that from the master data tables of the Hintverwaltung the corresponding hint record can then be pulled, then via a program variable the database request statement can be passed. Exemplary An implementation in the SAP programming language ABAP becomes the Hint use shown below. Here are the database request accesses outsourced in modularized units (function blocks).
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.If Hints actually needed will be during development, test or productive use. The corresponding maintenance of the hint master data takes place, for example. through the Database administrators or the technical maintainers of the applications. Is for a call to a database request does not return a hint in the hint table entered, causes the insertion the back text% _hints no change of 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: In order to be able to change hints dynamically (ie without program adjustments), a hint management via master data tables has been developed. To use this hint administration, the following ABAP statements must be implemented in the DB access blocks:
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.at The development of new DB access blocks is the use of the dynamic hint management duty. The macro is get-hint standard with the select number '00' (3rd transfer parameter) call. This call is found once per function module at the beginning and fills an internal table with all hint texts for this when number and specifically the variable vl_hint_text with the hint text for the default case '00' '01'. More hint text selections for If when need only find out about this when needed Macro get-hint-from-itab (see below) instead.
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.If Hints actually needed will be during development, test or productive use. The corresponding maintenance of the Hint master data is done by DP / AI. Is for a certain When number no master data entry exists causes the insertion the hint text (% _hint ...) in the select statement no change in DB access.
Beispiel 1 (Standardfall): Example 1 (standard case):
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 in a select statement different hints in dependence be used by the data constellation, first the macro called get-hint as described above. Depending on the data constellation is then with the macro get-hint-from-itab stating the appropriate Select (1st parameter) and sequential number (2nd parameter) provided the desired hint text.
Beispiel 3: mehrere Hints für mehrere Selects innerhalb einer When-NummerExample 3: several hints for many 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 within a when number multiple selects (for different or the same Tables), first the macro get-hint as described above called. For each Select is then specified with the macro get-hint-from-itab the corresponding select (1st parameter) and consecutive number (2nd parameter) the desired one Hint text provided.
Claims (10)
Priority Applications (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 |
PCT/EP2007/051296 WO2007115847A1 (en) | 2006-04-10 | 2007-02-09 | Automatic optimisation of request processing in databank systems |
Applications Claiming Priority (1)
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 |
Publications (2)
Publication Number | Publication Date |
---|---|
DE102006017076A1 true DE102006017076A1 (en) | 2007-10-11 |
DE102006017076B4 DE102006017076B4 (en) | 2020-04-23 |
Family
ID=37908138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
DE102006017076.8A Active DE102006017076B4 (en) | 2006-04-10 | 2006-04-10 | Automatic optimization of query processing in database systems |
Country Status (2)
Country | Link |
---|---|
DE (1) | DE102006017076B4 (en) |
WO (1) | WO2007115847A1 (en) |
Citations (5)
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 |
US20030182276A1 (en) * | 2002-03-19 | 2003-09-25 | International Business Machines Corporation | Method, system, and program for performance tuning a database query |
US20030236782A1 (en) * | 1998-10-05 | 2003-12-25 | Oracle International Corporation | Dynamic generation of optimizer hints |
US20050120000A1 (en) * | 2003-09-06 | 2005-06-02 | Oracle International Corporation | Auto-tuning SQL statements |
US20050144172A1 (en) * | 2003-12-09 | 2005-06-30 | Michael Kilian | Methods and apparatus for generating a content address to indicate data units written to a storage system proximate in time |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040019587A1 (en) | 2002-07-25 | 2004-01-29 | You-Chin Fuh | Method and device for processing a query in a database management system |
-
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 (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030236782A1 (en) * | 1998-10-05 | 2003-12-25 | Oracle International Corporation | Dynamic generation of optimizer hints |
US6345266B1 (en) * | 1998-12-23 | 2002-02-05 | Novell, Inc. | Predicate indexing for locating objects in a distributed directory |
US20030182276A1 (en) * | 2002-03-19 | 2003-09-25 | International Business Machines Corporation | Method, system, and program for performance tuning a database query |
US20050120000A1 (en) * | 2003-09-06 | 2005-06-02 | Oracle International Corporation | Auto-tuning SQL statements |
US20050144172A1 (en) * | 2003-12-09 | 2005-06-30 | Michael Kilian | Methods and apparatus for generating a content address to indicate data units written to a storage system proximate in time |
Non-Patent Citations (2)
Title |
---|
AMMAR,M.H.,et.al.: Using Hint Tables to Locate Resources in Distributed Systems. In: Proc.of Infocom '88. ISB 0-8186-0833-1.New Orleans,USA, März 1988,S.1050-1059; * |
Hard Coding. (Online) Wikipedia, Wikimedia Foundation. Inc.,St. Petersburg,FL,USA,Versionsstand 31.03.2006,recherchiert am 19.10.06; * |
Also Published As
Publication number | Publication date |
---|---|
WO2007115847A1 (en) | 2007-10-18 |
DE102006017076B4 (en) | 2020-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE4218025C2 (en) | Apparatus and method for automatically associating data storage devices in a computer system | |
EP0910829B1 (en) | Database system | |
DE69934894T2 (en) | METHOD AND DEVICE FOR OPTIONALLY ADJUSTING ACCESS TO APPLICATION FEATURES | |
DE69932465T2 (en) | File distribution system and its method | |
DE112010004772T5 (en) | A method and system for managing system management agent configurations in a distributed environment | |
EP0829046B1 (en) | Method and system for setting up user programs as well as user computer in a computer net | |
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 | |
EP2500823A1 (en) | Operation of a data processing network with multiple geographically decentralised data centres | |
DE69723500T2 (en) | Data quality management system | |
DE202021004340U1 (en) | Restricted views for controlling access to information in a database system | |
DE102006017076B4 (en) | Automatic optimization of query processing in database systems | |
DE102004007231B4 (en) | Method for configuring an automation component of an automation system and corresponding automation system | |
EP3583520B1 (en) | Method of operating a data storage system, computer program for implementing the method and data storage system operating according to the method | |
DE10039505A1 (en) | Data file data storage method e.g. for computer systems, involves forming number of memory zones for data files having first zone and end zone, before storage of data in assigned memory zones | |
EP1285315B1 (en) | Information processing system and method for operation thereof | |
DE102005010405B4 (en) | System arrangement and method for automated application development with user guidance | |
EP1033647A2 (en) | Method for porting a software system to other hardware platforms | |
DE19807436B4 (en) | System and method for controlling and monitoring programs in a computer network | |
DE102019118757B4 (en) | Method for establishing cache coherence in multi-core processors | |
DE19951756B4 (en) | Data management method and computer program and system for executing it | |
EP2136303B1 (en) | Method for controlling an automatic update of data views in a computer system | |
WO2015192830A1 (en) | Client-server system and terminal | |
EP4006741A1 (en) | Data processing device and method for managing data from a plurality of entities | |
DE102006037968B4 (en) | Universal and extensible data management with observation and inter-process communication mechanisms | |
EP4246326A1 (en) | Method, apparatus and system for real-time process monitoring |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
OM8 | Search report available as to paragraph 43 lit. 1 sentence 1 patent law | ||
R012 | Request for examination validly filed |
Effective date: 20130109 |
|
R016 | Response to examination communication | ||
R016 | Response to examination communication | ||
R079 | Amendment of ipc main class |
Free format text: PREVIOUS MAIN CLASS: G06F0017300000 Ipc: G06F0016000000 |
|
R018 | Grant decision by examination section/examining division | ||
R081 | Change of applicant/patentee |
Owner name: LUFTHANSA SYSTEMS GMBH, DE Free format text: FORMER OWNER: LRS LUFTHANSA REVENUE SERVICES GMBH, 22844 NORDERSTEDT, DE Owner name: LUFTHANSA SYSTEMS GMBH & CO. KG, DE Free format text: FORMER OWNER: LRS LUFTHANSA REVENUE SERVICES GMBH, 22844 NORDERSTEDT, DE |
|
R082 | Change of representative |
Representative=s name: WSL PATENTANWAELTE PARTNERSCHAFT MBB, DE |
|
R020 | Patent grant now final | ||
R081 | Change of applicant/patentee |
Owner name: LUFTHANSA SYSTEMS GMBH, DE Free format text: FORMER OWNER: LUFTHANSA SYSTEMS GMBH & CO. KG, 65479 RAUNHEIM, DE |