Re: Regression in IN( field, field, field ) performance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Regression in IN( field, field, field ) performance
Date
Msg-id 1218.1224986147@sss.pgh.pa.us
Whole thread Raw
In response to Re: Regression in IN( field, field, field ) performance  ("Robert Haas" <robertmhaas@gmail.com>)
List pgsql-hackers
"Robert Haas" <robertmhaas@gmail.com> writes:
> Given that, would it make any sense to put all the
> constants in an ARRAY and use OR for any variables?  i.e. given

> Whatever IN (Const1, Var1, Const2, Var2, Const3, Var3)

> Generate:

> Whatever = ANY (ARRAY[Const1, Const2, Const3]) OR Whatever = Var1 OR
> Whatever = Var2 OR Whatever = Var3

Yeah, I like this --- it seems a bit more principled/easier to
understand than just arbitrarily switching between an all-ARRAY
and a no-ARRAY formulation, which is what I put in earlier today.
I'll go change that ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Patch for ALTER DATABASE WITH TABLESPACE
Next
From: Michael Fuhr
Date:
Subject: Re: Full socket send buffer prevents cancel, timeout