fragrans23's recent timeline updates
fragrans23

fragrans23

V2EX member #506331, joined on 2020-09-02 13:06:05 +08:00
Today's activity rank 20733
fragrans23's recent replies
Jul 9, 2025
Replied to a topic by Clannad0708 生活 祝我生日快乐
生日快乐
已注册。[email protected]
Sep 11, 2024
Replied to a topic by yiton 职场话题 大家的公司中秋都发的什么福利?
Aug 14, 2024
Replied to a topic by NoOneNoBody 软件 windows 有什么简洁的 epub 阅读器
微软商店的 justread
Jun 13, 2024
Replied to a topic by fragrans23 MySQL 请教各位大佬一个 SQL 查询的问题
@xiangyuecn 这个联合索引之前加了,加了后有 5 秒的速度。SELECT contactId,MAX(start_time)这个子查询速度几十毫秒,不加 order by 进行排序不到一秒。非要这么查的话好像没啥办法了。。。
Jun 13, 2024
Replied to a topic by fragrans23 MySQL 请教各位大佬一个 SQL 查询的问题
@xiangyuecn 大佬牛逼,现在是 14 万左右数据,返回 5 秒左右。还能优化吗。。sql 是这样的

SELECT
XXX
FROM
iqc_xml xml
LEFT JOIN
iqc_wav wav ON xml.filename = wav.filename
LEFT JOIN
(SELECT
contactId,
MAX(start_time) AS sort_value
FROM
iqc_xml
GROUP BY
contactId) AS tmp ON tmp.contactId = xml.contactId
ORDER BY
tmp.sort_value DESC,
xml.contactId,
xml.start_time DESC;
Jun 13, 2024
Replied to a topic by fragrans23 MySQL 请教各位大佬一个 SQL 查询的问题
@godall 总的数据量,数据量在慢慢增加,现在又 14 万左右了。distinc 确实没啥用。后面的 group by 主要是让相同的 contactId 放在一起,也按时间倒序。
Jun 13, 2024
Replied to a topic by fragrans23 MySQL 请教各位大佬一个 SQL 查询的问题
@Richared 嗯,要全部返回。。
Jun 13, 2024
Replied to a topic by fragrans23 MySQL 请教各位大佬一个 SQL 查询的问题
@BiChengfei 类似上面 gpt 的用法吗,效果也不咋好。。
Jun 13, 2024
Replied to a topic by fragrans23 MySQL 请教各位大佬一个 SQL 查询的问题
@MoYi123 order by 要用吧,不然就排不了序了
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3066 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 28ms · UTC 14:05 · PVG 22:05 · LAX 07:05 · JFK 10:05
♥ Do have faith in what you're doing.