All Forums Teradata Applications
Sankalp.C 45 posts Joined 08/13
04 Sep 2014
FASTEXPORT - Sorted order two further distribution between amps. But Why?

In fast Exprot If we order SORTed way two further Distribution between amps will be required. But Why?

Raja_KT 1246 posts Joined 07/09
05 Sep 2014

The question is not clear. Can you elaborate more?

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

dnoeth 4628 posts Joined 11/04
05 Sep 2014

Those steps are needed to provide the ability to export a sorted result set using multiple sessions.
The query finished and each AMP has it's result sorted in a local spool.
This spool is then passed to FastExport.
The first step sends all rows with the lowest value to a single AMP, the 2nd lowest value to the 2nd AMP and so on in round robin.
The second steps accumulates those presorted rows from all AMPs into datablocks which are sent to AMPs in round robin again.
As a result the 1st datablock on the 1st AMP got the lowest range of values, the 2nd the next range and so on.
Now those blocks can be sent in parallel using multiple sessions to the client.
 
Of course this is a huge overhead so you should try to avoid ORDER BY in FastExport whenever possible.

Dieter

Raja_KT 1246 posts Joined 07/09
05 Sep 2014

It is my bad. All the while, I have been reading FASTLOAD instead of FASTEXPORT as the other post(posted next to yours). I was wondering how can it be? :).
You can use nospool option too:
The NoSpool mode exports the contents of a table as fast as possible without reading the table into a spool file or distributing the file to all AMPs before extracting it.
 

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

Sankalp.C 45 posts Joined 08/13
05 Sep 2014

Thanks! Dieter, Thanks! Raja

You must sign in to leave a comment.