On Oct 16, 9:50 am, Felix <schle...@cshl.edu> wrote:
[snip]
> I could create a new table matching each row in b to all values of
> b.bar and use that to join but that would be inefficient and very
> redundant.
>
[snip]

Is foobar(b.bar) essentially static? (I'm guessing so if you
considered this as an option).
If so, then this actually sounds like the best option to me.
Indexing on the foobar return values, this new table and joining
as described has got to be faster than the other alternatives
(even the foobar(b.bar,k) options).
Without this new table, it seems you have to calculate foobar(b.bar)
for every row of b (even if it is SQLite doing it, and not you
directly), unless I'm missing something.  I'm assuming that the
overhead to store these function values won't kill you.
Good luck!

Pete


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to