On Nov 5, 9:40 am, Robert Walker <[email protected]> wrote: > I don't know how extensive (i.e. how many scenarios) your benchmarking > involved, but if it was only one contrived test that may not be enough. > For example what effect does an increasing number of values in the in() > have on performance? > > Searching a single table on an indexed simple integer is obviously going > to be faster than a join. However, as the number of values in the "in" > clause increases you need to know how that affects performance. For > example in(1,2) might be significantly different than > in(1,3,5,7,20,50,100,200). > > My point is that performance of an in() likely doesn't increase linearly > with the number of values. > Thanks for the reply - I don't seem to get many. Your point is well taken and I guess it depends the application. I've done a few in() joins in another application where the array was over a thousand ids and it blasted through it.
I also didn't have the "type" indexed and that would make some difference. I'm just thankful I figured out how to do the join query:-) - have not did many of those. Steve -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

