News for hackers. Stuff that matters.
Re:When should you use the IN instead of the OR operator in ... by consoomer on Thursday August 31, 2023 @09:48AM (#37337110)
Seems like an obvious optimization to use a hash instead of scanning the array with comparisons... but I bet it's hard because on small arrays sequentially scanning is faster than building a hash first. Does anyone know at what size the optimizer switches from scanning the list to a hash?
Re:When should you use the IN instead of the OR operator in ... by angry__panda on Thursday August 31, 2023 @09:54AM (#37337200)
Based on my experiments, Postgres switches from scanning the list to a hash when the array size > 8.