LDEV-4813 Use tables only if a condition is providedIf tables are used and no condition which uses them is provided, a fullouter join is run. It takes ages to complete on a large instance.
LDEV-4801 Revert changes of FileDAOThey did not lead to fixing the problem and were actually unnecessary:FileDAO does not use DB connections, so no need for transactions.