On Fri, Jan 20, 2006 at 07:23:10PM -0500, Tom Lane wrote: > I'm not very clear on what tsearch2 is doing with these bitmaps, but it > looks like an upper page's downlink has the union (bitwise OR) of the > one-bits in the values on the lower page, and you have to visit the lower > page if this union has a nonempty intersection with the set you are looking > for. If that's correct, what you really want is to divide the values so > that the unions of the two sets have minimal overlap ... which seems to me > to have little to do with what the code does at present. Sort of like the vertex-cover problem? That's probably a lot harder than finding the two farthest points... /* Steinar */ -- Homepage: http://www.sesse.net/