Hello,
In a DSS environment, where a large SORTHEAP is common, will DB2 always grab the entire amount of SORTHEAP when attempting a piped sort, or is it capable of grabbing less RAM than SORTHEAP when the sort is estimated to be very small? To keep things simple, let's assume that no one else is sorting at that moment and that all of SORTHEAP is available for use.
DB2 will grab what it needs. If you do an explain on a particular query it will tell you the estimated sort heap required:
| | | #Sort Key Columns = 2 | | | | Key 1: TBNAME (Ascending) | | | | Key 2: TBCREATOR (Ascending) | | | Sortheap Allocation Parameters: | | | | #Rows = 126 | | | | Row Width = 16 | | | Piped
126 * 16 = 2016 bytes for this sort (approx). Of course this is only as good as the stats and the optimizer.
Other sorts used by the same SQL statement may require SORTHEAP concurrently.
Good luck,
Ian
- ::: When replying to the list, please use 'Reply-All' and make sure ::: a copy goes to the list ([EMAIL PROTECTED]). *** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED] *** For more information, check http://www.db2eug.uni.cc
