Home | Previous Page | Next Page   Appendix A. Estimating Table and Index Size > Index Page-Size Estimates >

Estimating Sort Memory

To calculate the amount of virtual shared memory that the database server might need for sorting, estimate the maximum number of sorts that might occur concurrently and multiply that number by the average number of rows in each dbspace and the average row size.

For example, if you estimate that 30 sorts could occur concurrently, the average row size is 200 bytes, and the average number of rows in a table or dbspace is 400, you can estimate the amount of shared memory that the database server needs for sorting as follows:

30 sorts * 200 bytes * 400 rows = 2,400,000 bytes

If PDQPRIORITY is 0, the maximum amount of shared memory that the database server allocates for a sort is about 128 kilobytes for each sort thread. If PDQPRIORITY is greater than 0, the database server allocates sort memory from the total memory allocated to the query.

Specify more memory with the DS_TOTAL_MEMORY configuration parameter and request a larger portion of that memory with the PDQPRIORITY configuration parameter.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]