2 ms·
I rarely use massive IN clauses though. I use arrays. SELECT * FROM orders WHERE id = ANY(?::bigint[]) It originated as just being an easy way to
by paulddraper 7y ago
I rarely use massive IN clauses though.
I use arrays.
SELECT *
FROM orders
WHERE id = ANY(?::bigint[])
It originated as just being an easy way to parameterize my queries; IDK how the performance compares.
From their blog post, I know Datadog does the same. [1]
[1] https://www.datadoghq.com/blog/100x-faster-postgres-performance-by-changing-1-line/ https://www.datadoghq.com/blog/100x-faster-postgres-performa...