What makes you think you have a problem?
You cannot prevent sort spills. Sort spills occur when there is more
data to sort than will fit into the allocated workspace. Your allocation
of 25k+ pages will provide a 100mb sort work space. The sort heap
threshold will allow a few less than 40 concurrent sorts before
restricting the storage allocated to the next (concurrent) sort. Don't
forget that there are overall memory limits on how much real memory an
instance can use.
I'm assuming you're not running into the "hard" limit that
SHEAPTHRES_SHR causes because you stated that the sorts are spilling and
not failing. Do a search on the various sortheap controlling parameters
in the online rinformation center to get additional information about them.
You should also post additional information about your operating system,
db2 service level, and memory available on the system.
You've sspecified a large sort work area but are using a miniscule
default for the database buffer pools. The information you provided does
not indicate the size of the buffer pools, only the default size if you
haven't modified them.
You need to get a databbase snapshot to determine the percentage of
sorts that are overflowing. Better is to get two of them with a time
interval between them and use both to determine what happened over the
interval.
Phil Sherman
rdudejr wrote:
Quote:
Hi all,
>
Outside of changing the SQL of the query or creating indexes, what can
one do in order to prevent sort spills. Im thinking along the lines of
the db cfg and dbm cfg files. Ill post the current setup we have of
one database which is having problems with these:
>
db2 get dbm cfg:
>
Database manager configuration release level = 0x0a00
>
>
>
Sort heap threshold (4KB) (SHEAPTHRES) = 400000
>
>
>
db2 get db cfg
>
Database Configuration for Database
>
|
Quote:
>
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = 25600
Sort list heap (4KB) (SORTHEAP) = 25600
|