pathurlencode to deal with ports
table optimizing after garbage collect
index on image.albumid
cleanup query unnecessary field selections