Just keep in mind that SORTHEAP is used differently by queries and LOAD. In case with the LOAD, it will attempt to allocate SORTHEAP pages of memory for each index it is building. If there is not enough SORTHEAP size available, it will return you a message "Not enough memory available for a (private) sort heap of size 13316 Trying smaller size..." and will try to allocate a smaller size.
Ellen Klebaner-Reys Data Management Services Inovant - a Visa Solutions Company [EMAIL PROTECTED]/650-432-1746 m/s: 3125-1D -----Original Message----- From: Ian D. Bjorhovde [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2003 12:31 PM To: [EMAIL PROTECTED] Subject: Re: [DB2EUG] Possibility of partial SORTHEAP allocation? [EMAIL PROTECTED] wrote: > > > > 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 - ::: 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
