Page 1 of 1

Stable sort option in sort stage

Posted: Mon Mar 08, 2010 12:05 pm
by mallikharjuna
Hi All,

in sort stage for stable sort option if we select it false, is there any effect on the performance? If it effects please explain how it will effect on performance.


Thanks in Advance

Posted: Mon Mar 08, 2010 1:16 pm
by asorrell
Stable sort means "if you have two or more records that have the same exact keys, keep them in the same order on output that they were on input".

Since keeping track of relative record location means more work, setting Stable to "False" will speed up performance.

Posted: Mon Mar 08, 2010 2:22 pm
by mallikharjuna
Thanks asorrell

But what is the use of sort stage Stabe check box in input tab

Posted: Mon Mar 08, 2010 3:52 pm
by chulett
He explained that. If there's a part in there that is unclear, let us know what.

Posted: Mon Mar 08, 2010 4:13 pm
by mallikharjuna
In two places i saw stable sort option

1) in Stage>Properties>options>stable sort(true or False)

2) input tab we have to select one check box (perform sort or stable or unique)

My question is what is the difference between these two?

Regards
Mallikharjuna Reddy

Posted: Mon Mar 08, 2010 4:14 pm
by ray.wurlod
The Stable Sort check box allows one to assert that the sort specified on the input link is (or is not) to be a stable sort.

Posted: Mon Mar 08, 2010 4:18 pm
by dsuser_cai
When you set stable sort to true the input (non key column) sort order is maintained, when you set it to false the sort order is not maintained. basically its used to maintain the order of Non key columns.