do not run expensive JDBC query if FILEMOVES table is empty or tracking of renamed files is off
this works around #774
Merge pull request #780 from vladak/union_workaround

do not run expensive JDBC query if FILEMOVES table is empty or tracking ...