You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
articlesUsingImages and uniqueUsedImages are being fetched from the same table(globalimagelinks ) to it can be merged into a single query.
sql = 'select count(*) as articlesUsingImages, count(distinct gil_to) as uniqueUsedImages from globalimagelinks where gil_to in (select log_title from logging_userindex where log_type="upload" and log_user=(select user_id from user where user_name="%s"));' % username
It would require merging the two methods into a single function but would at least save 1 DB call.
The text was updated successfully, but these errors were encountered:
articlesUsingImages
anduniqueUsedImages
are being fetched from the same table(globalimagelinks
) to it can be merged into a single query.It would require merging the two methods into a single function but would at least save 1 DB call.
The text was updated successfully, but these errors were encountered: