seems like you are looking for the functionality of except
q)except
k){x@&~x in y}
i:select i from db_big where not ti in db_small.ti
set[:c:/q/splay/db_big/ti; get[
:c:/q/splay/db_big/ti] i.x]
set[:c:/q/splay/db_big/p; get[
:c:/q/splay/db_big/p] i.x]