Quick Links



Keywords

Mofa durchbricht Schallmauer

(english version below)
Ich fand schon immer, dass das Wort Tuning die Performance Verbesserung in Oracle Datenbanken ziemlich schlecht beschreibt.
Kürzlich habe ich die Ausführung eines hochfrequentierten SQL Statements beschleunigt.
Vorher Elapsed: 00:00:12.68
Nach Tuning Elapsed: 00:00:00.00

Lässt man den Messfehler ausser Acht, ergibt sich eine Performance Verbesserung von unendlich (12,68 sec / 0 sec).
OK, ok, teilen durch 0 ist nicht erlaubt …

Es braucht also einen andere Vergleichsgröße ohne Rundungsfehler:
Der Blockumsatz vorher
1 db block gets
173692 consistent gets
173669 physical reads

Und nachher
0 db block gets
14 consistent gets
0 physical reads

Setzt man die Anzahl der gelesenen Blöcke (fast ausschließlich Index-Blöcke) ins Verhältnis, ergibt sich eine Verbesserung von (1+173.692+173.669) / 14 = 24.812 .

Der Begriff Tuning ist ja eher aus dem Bereich Motoren bekannt. Wenden wir die ermittelte Verbesserung des SQL Statements doch mal auf Motoren an:
Ein Mofa also, das normalerweise eine Höchstgeschwindigkeit von 25 Kmh hat, würde mit diesem Tuning-Faktor auf 25Kmh * 24.812 = 620.289 Kmh kommen. 
Mehr als 500-fache Schallgeschwindigkeit. Bitte festhalten.


Scooter is Breaking the Sound Barrier

The word tuning seems to be a relatively bad notion for performance improvement in Oracle Databases.
Recently, I accelerated a highly frequented SQL Statement.
Before Elapsed: 00:00:12.68
After tuning Elapsed: 00:00:00.00 .

Leaving the inaccurate time measurement aside, this is an infinitely high performance improvement.
OK, ok, division by 0 is not allowed …

Thus, we are in need for another way to compare:

Block turnover before
1 db block gets
173692 consistent gets
173669 physical reads

And after tuning
0 db block gets
14 consistent gets
0 physical reads

Now, the ratio of read blocks gives us an improvement of (1+173,692+173,669) / 14 = 24,812 .

Tuning as a notion is well-known from the area of engine acceleration. So, for comparison, let’s apply the numbers to motors. A Scooter (motor-supported bicycle; I can’t remember having seen very many of these in the US) with a speed limit of 25 kilometers per hour (15.53 miles per hour) would be tuned to arrive at 620,289 Kmh (385,429,7 miles per hour). More than 500 times the speed of sound. Fasten seat belts, please.

Comment: Looks like US readers seem to have difficulties to discover the fun in this article. You guys don’t know how it feels as a kid to accelerate a 15 mph device to stunning 49 mph, risking everybody’s head.

Comments are closed.