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

2008-05-29 Thread Alexey Kupershtokh
Thanks for the response. I've taken a look at this feature. But it seems unapplicable to my case: this table is not a many2many relation which seems the most common case of the intarray usage. The table just stores an information about items (rss posts): what feeds (rss) are they from, and thei

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

2008-05-29 Thread Oleg Bartunov
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 taking different (~x2) time to finish. In just a few words it can be described

[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