[ BEHAVIOR ] Run \addons\ask\Ask @view_filter [ RunTime:0.000156s ]
[ DB ] CONNECT:[ UseTime:0.000301s ] mysql:host=127.0.0.1;port=3306;dbname=www_youthra_cn;charset=utf8mb4
[ SQL ] SHOW COLUMNS FROM `fa_ask_tag` [ RunTime:0.000649s ]
[ SQL ] SELECT COUNT(*) AS tp_count FROM `fa_ask_tag` WHERE ( `status` = 'normal' ) AND `fa_ask_tag`.`deletetime` IS NULL LIMIT 1 [ RunTime:0.000176s ]
[ SQL ] SELECT * FROM `fa_ask_tag` WHERE ( `status` = 'normal' ) AND `fa_ask_tag`.`deletetime` IS NULL LIMIT 460,20 [ RunTime:0.001077s ]
[ SQL ] SHOW COLUMNS FROM `fa_ask_category` [ RunTime:0.000511s ]
[ SQL ] SELECT * FROM `fa_ask_category` WHERE `type` = 'tag' AND `status` = 'normal' ORDER BY `weigh` DESC,`id` DESC [ RunTime:0.000172s ]
[ SQL ] select r.* from (
select t.*, row_number() OVER (PARTITION BY tagid ORDER BY createtime desc) rank from (
SELECT tg.tag_id tagid, g.name tagname,f.title,f.type sourcetype, f.action, f.createtime, tg.source_id sourceid,t.type
FROM fa_ask_attention t
JOIN fa_ask_tag g ON t.source_id = g.id
JOIN fa_ask_taggable tg ON tg.tag_id = g.id AND tg.type = 'question'
JOIN fa_ask_feed f ON f.source_id = tg.source_id AND f.action = 'post_question'
WHERE t.type = 'tag'
UNION ALL
SELECT tg.tag_id tagid, g.name tagname,f.title,f.type sourcetype, f.action, f.createtime, tg.source_id sourceid,t.type
FROM fa_ask_attention t
JOIN fa_ask_tag g ON t.source_id = g.id
JOIN fa_ask_taggable tg ON tg.tag_id = g.id AND tg.type = 'article'
JOIN fa_ask_feed f ON f.source_id = tg.source_id AND f.action = 'post_article'
WHERE t.type = 'tag'
) t ORDER BY tagid,rank) r WHERE rank = 1 ORDER BY createtime DESC [ RunTime:0.000322s ]