Hi,
I'm on DB2 8.1 (FP5) on AIX (ML5) on a 32bit system.
I have a question regarding how to set the optimal size for SORTHEAP to avoid sort overflows and sorts in general.
After i've execute an sql, with only 1 active agent against the databse, I've used the command "db2 get snapshot for dbm |grep ort" with the output:
Private Sort heap allocated = 0
Private Sort heap high water mark = 117462
Post threshold sorts = 9
Piped sorts requested = 11148
Piped sorts accepted = 11148
My SORTHEAP = 12288 (4K) and SHEAPTHRES = 82000 (4K).
Firstly, the 'Private sort heap high water mark ' - how is this being allocated when my SORTHEAP is only 12288.
Also, it appears that the 'private sort heap allocated' is always less than the SORTHEAP, that is it is always only about = 100 (even when there is only 1 active agent).
I've run explain against this SQL, and calculated the max(ROWSxROWWIDTH) to obtain what i would have thought to be the max SORTHEAP size. So i then configure this on the database and rerun the SQL and once again, i get sort overflows as the 'private sort heap allocated' is only around 100.
As you can see i appear to be going round in circles so if anyone can point out the missing link it would be much appreciated.
Linda