Re: Stored Procedure cache size (PC_POOLSIZE)
Posted in 1997
>>overwritten by newer procedures read in from disk. IF you do not have >>many, then I would suggest leaving it alone, since the memory that is >>required for this is not extreme. The parameter that goes along with >>this is PC_HASHSIZE, default of 31, and should be prime. > Why prime? The reason that a prime size for this is that it is used to provide quick access to the procedure cache. Generally (and we have to emphasize the word "generally"), hash algorthems work by 'folding' the bit patterns of the key into a number and then using key_number % size_of_hash_table to index into the hash table. If there are common patterns in the origional key, or if the original key is not very random, then there is an increased probability in patterns forming in the resulting hash buckets. In this case, since the character name of the procedure is the original key, we are already limited to only a few of the 256 bit patterns per byte. So - in order to minimize the probability of any clumping forming in the hash patterns, it's a good idea to use a "near prime" number in a hash. By near prime, I would suggest not to allow the size to be evenly divided by 2, 3, 5, 7, or 11. Madison Pruet