Database access optimizations, preview photos