Re: Performance improvement for queries with IN clause

2019-11-11 Thread Rafia Sabih
On Sat, 9 Nov 2019 at 12:52, Andreas Karlsson wrote: > On 11/8/19 2:52 PM, Rafia Sabih wrote: > > Now, my question is shouldn't we always use this list in sorted order, > > in other words can there be scenarios where such a sorting will not > > help? I am talking about only the cases where the li

Re: Performance improvement for queries with IN clause

2019-11-09 Thread Amit Kapila
On Sat, Nov 9, 2019 at 5:22 PM Andreas Karlsson wrote: > > On 11/8/19 2:52 PM, Rafia Sabih wrote: > > Now, my question is shouldn't we always use this list in sorted order, > > in other words can there be scenarios where such a sorting will not > > help? I am talking about only the cases where the

Re: Performance improvement for queries with IN clause

2019-11-09 Thread Andreas Karlsson
On 11/8/19 2:52 PM, Rafia Sabih wrote: Now, my question is shouldn't we always use this list in sorted order, in other words can there be scenarios where such a sorting will not help? I am talking about only the cases where the list consists of all constants and could fit in memory. Basically,

Performance improvement for queries with IN clause

2019-11-08 Thread Rafia Sabih
Hello all, I would like to direct your attention to the queries of following type, select from where IN () the plan for such a query uses index scan (or index-only), now in our experiments, if the provided list is sorted then query performance improves by ~10%. Which makes sense also as once w