V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  zhangysh1995  ›  全部回复第 15 页 / 共 18 页
回复总数  356
1 ... 7  8  9  10  11  12  13  14  15  16 ... 18  
2020-07-04 15:23:08 +08:00
回复了 mirrorside 创建的主题 Google 话说 YouTube music 的翻译这都什么毛病?
@nekobest 香港 YouTube 上车吗?
2020-07-04 15:06:02 +08:00
回复了 TimPeake 创建的主题 Android 安卓手机 有什么办法禁止 A 软件打开 B 软件吗?
换小米吧。
2020-07-04 15:05:20 +08:00
回复了 Ho1iday 创建的主题 程序员 老哥们的旧笔记本都怎么处理?
@he110comex CPU 拆了都比这个贵的吧。。。
@wsseo 中文的暂时没。。主要大多数都是论文。。使用价值是指?
没有收获一个新的 star,伤心 (T_T)
看来 v 站 DBA 或者数据库开发不多?
2020-06-25 13:56:47 +08:00
回复了 woniuppp 创建的主题 程序员 端午早起重学计划
五点半是不有点太早了。。。
2020-06-24 19:59:09 +08:00
回复了 demonps 创建的主题 程序员 请教这条 mysql 优化出路在哪?
@demonps 问题应该在 where 里面前两个条件没有索引,可以拆开成 explain select it_id where c_user_id = 0 and l_user_id != 3333; 然后继续拆,单独看一下数据情况,估计会有至少一个估计不准确的(应该是 l_user_id 没有索引)。

我写这句的时候突然有个想法,你可以试下:

select it_id from assign_idx where (c_type, cat_id) in ((30, 1), (30, 2), (30, 3), (20, 4), (20, 6), (20, 9), (20, 10)) and c_user_id = 0 and l_user_id != 3333 order by create_time asc limit 1;
2020-06-24 17:03:07 +08:00
回复了 acz154 创建的主题 MySQL 求解一个 select 和 update 下 字段值 = 0 出现的错误
试一下 UPDATE aaa SET kk = null WHERE xx != 0
2020-06-24 16:53:16 +08:00
回复了 demonps 创建的主题 程序员 请教这条 mysql 优化出路在哪?
给一下
explain select it_id where (c_type, cat_id) in ((30, 1), (30, 2), (30, 3), (20, 4), (20, 6), (20, 9), (20, 10));
结果?
2020-06-24 16:51:55 +08:00
回复了 demonps 创建的主题 程序员 请教这条 mysql 优化出路在哪?
自己打下脸,好像 (c_type, cat_id) 可以优化

https://dev.mysql.com/doc/refman/8.0/en/range-optimization.html#row-constructor-range-optimization

Only IN() predicates are used, not NOT IN().
On the left side of the IN() predicate, the row constructor contains only column references.
On the right side of the IN() predicate, row constructors contain only runtime constants, which are either literals or local column references that are bound to constants during execution.
On the right side of the IN() predicate, there is more than one row constructor.
2020-06-24 16:39:55 +08:00
回复了 demonps 创建的主题 程序员 请教这条 mysql 优化出路在哪?
https://dev.mysql.com/doc/refman/8.0/en/multiple-column-indexes.html 文档

MySQL can use multiple-column indexes for queries that test all the columns in the index, or queries that test just the first column, the first two columns, the first three columns, and so on. If you specify the columns in the right order in the index definition, a single composite index can speed up several kinds of queries on the same table.
2020-06-24 16:37:17 +08:00
回复了 demonps 创建的主题 程序员 请教这条 mysql 优化出路在哪?
(c_type, cat_id) 是索引的一部分,所以建的索引不能用,慢
where 里面的 col 都不能用索引,慢
2020-06-17 21:34:01 +08:00
回复了 NewConn 创建的主题 程序员 关于几张超大表联合查询查询 SQL 的问题
@NewConn 不好意思我是妹子。
2020-06-16 18:43:02 +08:00
回复了 NewConn 创建的主题 程序员 关于几张超大表联合查询查询 SQL 的问题
WITH E AS (
SELECT ID
FROM A
WHERE type = 2
AND DELETE_FLAG = 0
AND uid = 41
UNION
SELECT a.ID
FROM A a, B b, A c
WHERE a.type = 3
AND a.DELETE_FLAG = 0
AND a.uid = 41
AND a.ID = b.ID
AND b.parent_id = c.ID
)

这里面为什么不能先把 a.type in (2,3) and a.delete_flag =0 and a.uid = 41 先选择出来然后再别的操作?这一句的 selectivity 有多少?有多少符合条件的?
2020-05-19 17:31:25 +08:00
回复了 0000zjn 创建的主题 MySQL MySQL 在线增加表注释、行注释是否会锁表
ALTER TABLE operations are processed using one of the following algorithms:

COPY: Operations are performed on a copy of the original table, and table data is copied from the original table to the new table row by row. Concurrent DML is not permitted.
不可以并发

INPLACE: Operations avoid copying table data but may rebuild the table in place. An exclusive metadata lock on the table may be taken briefly during preparation and execution phases of the operation. Typically, concurrent DML is supported.
可能加锁,一般可以并发

INSTANT: Operations only modify metadata in the data dictionary. No exclusive metadata locks are taken on the table during preparation and execution, and table data is unaffected, making operations instantaneous. Concurrent DML is permitted. (Introduced in MySQL 8.0.12)
允许并发

https://dev.mysql.com/doc/refman/8.0/en/alter-table.html
2020-05-09 18:34:00 +08:00
回复了 yukiloh 创建的主题 MySQL 有什么学习数据库的好资源吗
@yukiloh 我是学生。工作的时候碰到问题去搜索,其实就是把这个时间转嫁到实际操作的时候学习了。这个本科课程内容也没多少,认真一下,只了解概念,两三周绝对够了。
2020-05-08 14:12:52 +08:00
回复了 zhangysh1995 创建的主题 程序员 DB Fiddle 有国产替代品吗?
发现一个 http://sqlfiddle.com/ 就是广告有点明显。。。错误提示比 DB Fiddle 详细。
2020-05-08 14:08:33 +08:00
回复了 qiushaox 创建的主题 程序员 静态代码检查工具 coverity 怎样?
@gainsurier 有在招聘的。
1 ... 7  8  9  10  11  12  13  14  15  16 ... 18  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1500 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 48ms · UTC 16:40 · PVG 00:40 · LAX 08:40 · JFK 11:40
♥ Do have faith in what you're doing.