Re: [PERFORM] IN() statement values order makes 2x performance hit

2008-05-29 Thread Alexey Kupershtokh
, and their publication date. Id in the table is PK. Oleg Bartunov wrote: You may try contrib/intarray, which we developed specially for denormalization. Oleg On Thu, 29 May 2008, Alexey Kupershtokh wrote: Hello everybody! I have found a performance issue with 2 equivalent queries stably t

[PERFORM] IN() statement values order makes 2x performance hit

2008-05-29 Thread Alexey Kupershtokh
Hello everybody! I have found a performance issue with 2 equivalent queries stably taking different (~x2) time to finish. In just a few words it can be described like this: if you have a lot of values in an IN() statement, you should put most heavy (specifying most number of rows) ids first. T