I have a base user
profile table that stores data for users. Each user is able to upload multiple pictures so this is represented by a separate
When the user profile is queried, the entirety of the user's photos are not necessarily required, only the thumbnail of the first photo (profile picture). Only a further action will require the rest of the photos.
I would like to know if it is optimal to store a duplicate of the thumbnail of the profile photo on the user profile table or should I continue to do a complex nested query to fetch the thumbnail of the profile?
user_id | avatar --(cached copy of profile.thumbnail)
user_id | image | thumbnail | order