Mercurial > hgrepos > hgweb.cgi > s4
changeset 253:a40d258cc5aa
SQL last modifed is TOO slow. Revert once to previous one.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 18 Jul 2016 00:10:44 +0859 |
parents | 75dfaceac01f |
children | 8a0cf46afb0a |
files | s4-funcs.sh |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-funcs.sh Sun Jul 17 23:59:37 2016 +0859 +++ b/s4-funcs.sh Mon Jul 18 00:10:44 2016 +0859 @@ -1514,6 +1514,21 @@ WHERE a1.ctime = (SELECT max(ctime) FROM arts WHERE blogid=a1.blogid) GROUP BY a1.brid ORDER by a1.ctime DESC LIMIT 50;" + DT_SQL="SELECT b.rowid LINK, + ctime, + (SELECT $shortval FROM blog_s WHERE key='title' AND id=b.id) title, + (SELECT gecos FROM gecoses + WHERE name=(SELECT val FROM blog_s + WHERE key='owner' AND id=b.id)) owner + FROM blog b + JOIN + (SELECT distinct blogid, max(val) ctime + FROM article a, article_s s + ON a.id=s.id AND a.author='$user' AND s.key='ctime' + GROUP BY blogid ORDER BY val DESC LIMIT 50 + ) m + ON b.id=m.blogid;" + cat<<-EOF <div class="fold"> `cgi_checkbox mrd yes id="mre"`<label