Re: Index suggestion needed for performance improvement
Rick James Wrote:
-------------------------------------------------------
> * Use VARCHAR, not CHAR, unless the string is
> really fixed length.
>
> * Remove LEFT, it seems to be irrelevant.
you mean something like this
UPDATE users u,( SELECT count(content.record_num) as pdfs_uploaded_count, content.uploader as uploader
FROM users, content
WHERE content.anonymous = 0
AND content.uploader != 0
AND users.record_num = content.uploader
GROUP BY users.record_num) as s
SET u.pdfs_uploaded = s.pdfs_uploaded_count
WHERE u.record_num = s.uploader
If i use count(*) , how would mysql know which table to get count from ?
Subject
Views
Written By
Posted
1817
September 23, 2015 11:49AM
819
October 02, 2015 09:14PM
Re: Index suggestion needed for performance improvement
853
October 03, 2015 12:14AM
933
October 03, 2015 12:40AM
900
October 03, 2015 02:10AM
901
October 04, 2015 01:15PM
937
October 04, 2015 09:18PM
946
October 04, 2015 01:22PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.