postgresql 只改一行就获得100倍性能提升
from https://www.datadoghq.com/blog/100x-faster-postgres-performance-by-changing-1-line/
The query optimizer is fooled by the use of ARRAY[...] to list all the primary keys to look up. VALUES (...), (...) lets the optimizer make full use of the primary key index instead. It is literally a one-line change, which makes no semantic difference.

浙公网安备 33010602011771号