Re: Postgres memoizing inner loop of join when outer loop join key is guaranteed unique?

2025-10-29 Thread Jacob Jackson
Thanks! This is very helpful. On Wed, Oct 29, 2025 at 8:01 PM David Rowley wrote: > On Thu, 30 Oct 2025 at 07:29, Jacob Jackson > wrote: > > Hello. I was looking at some query plans recently and noticed something > that didn't make sense. I have a query that joins a tab

Re: Postgres memoizing inner loop of join when outer loop join key is guaranteed unique?

2025-10-29 Thread Jacob Jackson
Index Cond: ("user" = '0'::bigint) > enable_memoize=off: Index Cond: ("user" = '3477145805513'::bigint) > > All buffer counts look to be the same on both, and 514 is just 1.5% > smaller than 522. That looks like statistical noise to me. > >

Re: Postgres memoizing inner loop of join when outer loop join key is guaranteed unique?

2025-10-29 Thread Jacob Jackson
ect > results? > > Because a 45 microsecond (yes, 45 microseconds: 0.138 milliseconds = 138 > microseconds; same for the others) slowdown isn't something I'd get too > worked up about. > > On Wed, Oct 29, 2025 at 2:29 PM Jacob Jackson > wrote: > >> Hello

Postgres memoizing inner loop of join when outer loop join key is guaranteed unique?

2025-10-29 Thread Jacob Jackson
Hello. I was looking at some query plans recently and noticed something that didn't make sense. I have a query that joins a table of questions with results for each question (using a table with a composite primary key of question id and a user id), filtered by user id. The question IDs and the comb