> explain select col1 from s order by abs(col1 - 5) limit 10;
>
> is the one-dimensional equivalent of the type of query you're proposing
Exactly, it's already done in next version of patch :)
> and that doesn't work either until you put an index on abs(col1 - 5),
> then it just works, but only for k = 5.
BTW, it's possible to add this feature to plain btree by changing traversal
algorithm, but I'm fill enough power to do it.
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/