Freitag, Oktober 29, 2010

Pipelined functions über mehrere Datenbanken

Der Titel dieses Eintrags beschreibt vermutlich eher vage, worum es geht: Jonathan Lewis erklärt in seinem Blog, wie man eine pipelined function verwenden kann, um den Hint driving site für eine über mehrere Datenbanken verteilte Operation einsetzen zu können (was zumindest für CTAS und INSERT AS SELECT ohne diesen Trick nicht funktioniert):
The idea is simple. If you can write a distributed select statement that takes advantage of the /*+ driving_site */ hint to work efficiently, you can wrap the statement in a pl/sql cursor loop and stick that loop into a pipelined function to maximise the efficiency of create or insert as select.
Da pipelined functions nicht unbedingt zu meinen Standardwerkzeugen gehören, hier auch noch ein Link auf Tim Halls einführende Erläuterung zum Thema und seine Definition der besonderen Eigenschaften dieser Objekte:
Table functions are used to return collections that mimic tables. They can be queried like a regular table by using the TABLE function in the FROM clause. Regular table functions require collections to be complete before they are returned causing bottlenecks during large Extraction Transformation Load (ETL) operations. Pipelining negates the need to build huge collections by piping rows out of the function as they are created, allowing subsequent processing to start before the entire collection is fully populated.

Keine Kommentare:

Kommentar veröffentlichen