Alexander Korotkov <aekorot...@gmail.com> writes: > There is another cause of overhead when use randomization in gistchoose: > extra penalty calls. It could be significant when index fits to cache. In > order evade it I especially change behaviour of my patch from "look > sequentially and choose random" to "look in random order". I think we need > to include comparison of CPU time.
Hmm ... actually, isn't that an argument in favor of Heikki's method? The way he's doing it, we can exit without making additional penalty calls once we've found a zero-penalty tuple and decided not to look further (which is something with a pretty high probability). regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers