Re:Re: Improve cache hit rate for OprCacheHash

2025-08-22 Thread myzhen
Thanks for your reply,If multiple exact matches are found, it selects the first schema in activeSearchPath as the result. Therefore, the order of search_path is indeed meaningful. At 2025-08-22 20:18:06, "Heikki Linnakangas" wrote: >On 22/08/2025 14:15, myzhen wrote: >> The order of a

Re: Improve cache hit rate for OprCacheHash

2025-08-22 Thread Heikki Linnakangas
On 22/08/2025 14:15, myzhen wrote: The order of all schemas in OprCacheKey.search_path should be meaningless. No, operators live in schemas, just like tables and functions. To demonstrate: create schema schema1; create schema schema2; create function schema1.plus(int, int) RETURNS int AS $$

Improve cache hit rate for OprCacheHash

2025-08-22 Thread myzhen
Dear Hackers, The order of all schemas in OprCacheKey.search_path should be meaningless. If we sort the search_path when constructing OprCacheKey, we can improve the hit rate of the operator cache (OprCacheHash). Otherwise, when the number and content of schemas in the search_path remain unchang