Re: Expr. extended stats are skipped with equality operator

2022-08-07 Thread Tomas Vondra
On 8/5/22 11:50, Danny Shemesh wrote: > Hey all ! > > I'm on a quest to help the planner (on pg14) use the best of several > partial, expressional indices we have on some large tables (few TBs in > size, billions of records). > > As we know, stats for expressions in partial indices aren't gath

Re: Expr. extended stats are skipped with equality operator

2022-08-07 Thread Tom Lane
Tomas Vondra writes: > Yeah, this seems like a clear bug - we should not fail queries like > this. It's a sign statext_is_compatible_clause() and the MCV code > disagrees which clauses are compatible. Indeed. I attempted to fix that at e33ae53dd. regards, tom lane

Re: Expr. extended stats are skipped with equality operator

2022-08-07 Thread Tomas Vondra
On 8/7/22 19:28, Tom Lane wrote: > Tomas Vondra writes: >> Yeah, this seems like a clear bug - we should not fail queries like >> this. It's a sign statext_is_compatible_clause() and the MCV code >> disagrees which clauses are compatible. > > Indeed. I attempted to fix that at e33ae53dd. > Tha

Re: PostgreSQL 14.4 ERROR: out of memory issues

2022-08-07 Thread Aleš Zelený
Hello, The problem Joe spotted is that a variable name is misspelled in one > place. It should (probably) be external_complete_id, not > _external_complete_id). Oh, copy-paste issue :-) > > better solution proposal? > > I think you can make that clearer by using IS [NOT] DISTINCT FROM: > >