V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  GGGG430  ›  全部回复第 10 页 / 共 22 页
回复总数  426
1 ... 6  7  8  9  10  11  12  13  14  15 ... 22  
❮ ❯
2020 年 2 月 7 日
回复了 OysterQAQ 创建的主题 › 问与答 › inner join 下 order by 排序不走索引
因为 artist_id 过多导致子查询不方便的话, 你就增加一下(type, create_date)这个索引吧, explain 如下
1 SIMPLE illusts ref artist_id_type_create_date_index,type_create_date_index type_create_date_index 82 const 1 100 Using index condition
1 SIMPLE user_artist_followed ref user_id_artist_id_create_date,idx_artist_id user_id_artist_id_create_date 14 const,func 1 100 Using where; Using index

另外我觉得你第一个子查询中的 order by artist_id,type,create_date 很奇怪, 能否和最后的 order by 合并呢
2020 年 2 月 7 日
回复了 OysterQAQ 创建的主题 › 问与答 › inner join 下 order by 排序不走索引
explain select artist_id from user_artist_followed where user_id = 53;
explain select * from illusts where artist_id in (?, ?) and type = 'illust' order by artist_id, type, create_date;
感觉拆分一下子查询好点
2020 年 2 月 7 日
回复了 OysterQAQ 创建的主题 › 问与答 › inner join 下 order by 排序不走索引
create index type_create_date_index
on illusts ( type, create_date);
illusts 表上的 where 条件中 artist_id 用了表达式没走联合索引, 重新建一个
2020 年 2 月 7 日
回复了 OysterQAQ 创建的主题 › 问与答 › inner join 下 order by 排序不走索引
show create tables;
2020 年 2 月 3 日
回复了 zjq123 创建的主题 › 美酒与美食 › 你最喜欢的蔬菜?
包菜,花菜,蒜台,藕,蒜苗 都好弄
2020 年 1 月 25 日
回复了 Ellis 创建的主题 › Apple › 大佬们有苹果 APP store 验发票失败的吗
看来不止我一个人
2020 年 1 月 12 日
回复了 luyan 创建的主题 › 生活 › 关于解酒药
实际上没有解酒药, 也不要去吃解酒药, 喝酒的时候多吃菜, 多上厕所
2019 年 12 月 19 日
回复了 raysonlu 创建的主题 › PHP › PHP 常驻任务不会释放内存的吗?
问题出在 new someObj ()这里,以及调用这个对象中方法中存在申请内存并且未释放,外部的 unset 是不管用的,建议你复用这个对象
2019 年 12 月 5 日
回复了 salamanderMH 创建的主题 › NVIDIA › Ubuntu 更新后,发现 nvidia 驱动不能用了
只有 04 和 10 版本吧
2019 年 11 月 11 日
回复了 coderabbit 创建的主题 › Go 编程语言 › 请教一个 go 问题 append 追加!
temp 换成 map 类型试试, page 作为 key 递增
2019 年 10 月 24 日
回复了 kwanzaa 创建的主题 › Linux › QQ For Linux 已发布!
优秀
2019 年 9 月 30 日
回复了 passerbytiny 创建的主题 › 程序员 › 三天一休眠中自动唤醒更新,你让我休眠个蛋蛋。
ubuntu 用户表示从没有这些烦恼
2019 年 9 月 21 日
回复了 salamanderMH 创建的主题 › 问与答 › Ubuntu18 上安装 tp-link 的 TL-WN725N 驱动发现没效果?
@salamanderMH 我的和你版本类似,ubuntu16.04
2019 年 9 月 21 日
回复了 salamanderMH 创建的主题 › 问与答 › Ubuntu18 上安装 tp-link 的 TL-WN725N 驱动发现没效果?
tplink 官网都有相应的网卡驱动的,你去找找,我去年买的一个 tp 无线网卡,按照官网提供的驱动安装后没问题
2019 年 9 月 17 日
回复了 xdtr 创建的主题 › Linux › 求占内存少的 Linux 发行版
不去分析是哪些进程占用了内存❌

来 v2 发帖找其他发行版本√
2019 年 9 月 15 日
回复了 Heiban 创建的主题 › 京东 › 现在买东西是在天猫买的多还是在京东买的多?
京东普拉斯砖石会员路过
开启 fpm 慢日志,可以定位到那一行代码出问题
2019 年 8 月 30 日
回复了 shanlan 创建的主题 › 程序员 › 你旧笔记本用几年了?还会一直用下去吗?
12 年国庆买的笔记本, 目前双内存双固态, 屏幕偶尔开机会花, 散热基本靠外置散热器, 除了这两点, 性能绝对没问题
(拆了不知道多少次了, 反正上面的螺丝全换了一遍了)
2019 年 7 月 21 日
回复了 googleGirl 创建的主题 › Apple › iphone7 突然充不进去电了...
用针挑一下,是不是充电口里灰尘堆积
1 ... 6  7  8  9  10  11  12  13  14  15 ... 22  
❮ ❯
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1036 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 32ms · UTC 19:16 · PVG 03:16 · LAX 11:16 · JFK 14:16
♥ Do have faith in what you're doing.