Re: SearchCatCacheList()/SearchSysCacheList() is O(n)

2021-05-12 Thread Tom Lane
Andres Freund writes: > It's not an individual "result" list that's the issue. In my example > they're all exactly one element long. The problem is that CatCache->list > has one element for each cached SearchCatCacheList() result, and that > for every SearchCatCacheList() we linearly search throug

Re: SearchCatCacheList()/SearchSysCacheList() is O(n)

2021-05-12 Thread Andres Freund
Hi, On 2021-05-12 17:26:28 -0400, Tom Lane wrote: > Andres Freund writes: > > The problem is that SearchCatCacheList() is not actually a hash table - > > there are no buckets, in contrast to SearchCatCacheList(). > > Uh, what did you mean to compare to there? Oops, copy-and-paste failure. I was

Re: SearchCatCacheList()/SearchSysCacheList() is O(n)

2021-05-12 Thread Tom Lane
Andres Freund writes: > The problem is that SearchCatCacheList() is not actually a hash table - > there are no buckets, in contrast to SearchCatCacheList(). Uh, what did you mean to compare to there? > Tom, any chance you remember if this was an oversight, or whether you > just considered this t