Re: Query plans not identical for `id in(1,2,3)` and `(id=1 or id=2 or id=3)`

2024-03-10 Thread Ilya Basin
Laurenz thanks for the info. Thomas no I can't. Original Message From: Thomas Kellerer [mailto:sham...@gmx.net] Sent: Sunday, March 10, 2024 at 11:58 UTC To: pgsql-general@lists.postgresql.org Subject: Query plans not identical for `id in(1,2,3)` and `(id=1 or id=2 or id=3)`

Re: Query plans not identical for `id in(1,2,3)` and `(id=1 or id=2 or id=3)`

2024-03-10 Thread Thomas Kellerer
Ilya Basin schrieb am 09.03.2024 um 20:08: Hi List. I have a list of bigint keys and I need to retrieve rows by these keys. Normally, I would split this list into pages of size 900 and perform several `SELECT ... WHERE key in($1,$2,...)`. However, the proprietary ORM we use can only produce

Re: Query plans not identical for `id in(1,2,3)` and `(id=1 or id=2 or id=3)`

2024-03-10 Thread Laurenz Albe
On Sat, 2024-03-09 at 23:08 +0400, Ilya Basin wrote: > I have a list of bigint keys and I need to retrieve rows by these keys. > Normally, I would split this list into pages of size 900 and perform > several `SELECT ... WHERE key in($1,$2,...)`. However, the proprietary > ORM we use can only

Query plans not identical for `id in(1,2,3)` and `(id=1 or id=2 or id=3)`

2024-03-09 Thread Ilya Basin
Hi List. I have a list of bigint keys and I need to retrieve rows by these keys. Normally, I would split this list into pages of size 900 and perform several `SELECT ... WHERE key in($1,$2,...)`. However, the proprietary ORM we use can only produce this SQL: `SELECT ... WHERE (key=$1 or key=$2