Felix wrote: >> Define a function foobar_contains() as follows: >> >> def foobar_contains(foo, bar): >> return foo in foobar(bar) >> >> and change the query to >> >> select * from table a, table b where foobar_contains(a.foo, b.bar) > > I thought about that (see above), but it would not use an index on > a.foo which a regular a.foo IN (x,y,z) does.
Sorry for not reading your post carefully. Peter -- http://mail.python.org/mailman/listinfo/python-list