Add support for IN-lists padding to better reuse cached statements
As described in this Twitter thread, we could add a new feature which generates power-of-2 IN lists so we get a better chance of reusing the execution plan, especially on Oracle and SQL Server.
So, let's assume we have the following 3 SELECT queries executed:
We can rewrite them as:
This way we reuse the same cached statement:
Applied PR upstream.