orderby disabled where not needed
Merge with upstream.
Merge pull request #75 from michele-comitini/master

isempty() IS_NOT_IN_DB() speedup