- Jun 2024
-
Tags
Annotators
URL
-
- Feb 2023
-
motherduck.com motherduck.com
-
Most applications do not need to process massive amounts of data. This has led to a resurgence in data management systems with traditional architectures; SQLite, Postgres, MySQL are all growing strongly, while “NoSQL” and even “NewSQL” systems are stagnating.
SQL still shines over NoSQL
Tags
Annotators
URL
-
-
c.biancheng.net c.biancheng.net
-
MySQL是什么?它有什么优势?
- mysql是什么
-
- Jan 2023
-
Local file Local file
-
The DDGLC data are not accessible online as of yet. A migration of the database and the data into aMySQL target system is underway and will allow us to offer an online user interface by the end of 2017 Whatwe can already offer now is a by-product of our work, the Gertrud Bauer Zettelkasten Online.6'
61 Available online at http://research.uni-leipzig.de/ddglc/bauerindex.html. The Work on this parergon to the lexicographical labors of the DDGLC project was funded by the Gertrud-und Alexander Böhlig-Stiftung. The digitization of the original card index was conducted by temporary collaborators and volunteers in the DDGLC project: Jenny Böttinger, Claudia Gamma, Tami Gottschalk, Josephine Hensel, Katrin John, Mariana Jung, Christina Katsikadeli, and Elen Saif. The IT concept and programming were carried out by Katrin John and Maximilian Moller.
Digitization of Gertrud Bauer's zettelkasten was underway in 2017 to put the data into a MySQL database with the intention of offering it as an online user interface sometime in 2017.
-
- Dec 2022
-
stackoverflow.com stackoverflow.com
-
MySQL - Operand should contain 1 column(s) Ask Question
-
-
-
ResultMap collection多层嵌套使用
-
-
www.zhihu.com www.zhihu.com
-
MySQL数据库,数据表超过百万了查询速度有点慢。之后怎么存储呢?
Tags
Annotators
URL
-
-
-
既然MySQL中InnoDB使用MVCC,为什么REPEATABLE-READ不能消除幻读?
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
数据库MVCC和隔离级别的关系是什么?
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
如何根据sql语句逆向生成回滚语句?
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
到底什么情况下mysql innodb会发生回表操作?
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
为什么会有人写出几百行的SQL语句啊?这些人的心态是怎样的?为了凸显自己的强大吗?
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
关于幻读,可重复读的真实用例是什么?
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
Cache 和 Buffer 都是缓存,主要区别是什么?
-
-
www.zhihu.com www.zhihu.com
-
我们为什么要使用Mysql处理读写分离?读写分离有什么优点?
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
乐观锁与悲观锁各自适用场景是什么?
Tags
Annotators
URL
-
- Aug 2022
-
zhuanlan.zhihu.com zhuanlan.zhihu.com
-
UNLOCK TABLES;
-
-
-
select sleep(N)可以让此语句运行N秒钟
Tags
Annotators
URL
-
-
-
PAREPARE STATEMENT
Tags
Annotators
URL
-
-
juejin.cn juejin.cn
-
使用@DynamicUpdate性能会好一些。因为不使用@DynamicUpdate时,即使没有改变的字段也会被更新
Tags
Annotators
URL
-
-
time.geekbang.org time.geekbang.org
-
那么查询索引本身已经“覆盖”了需要的数据,不再需要回表查询。因此,这种情况也叫作索引覆盖
extra中显示:use index,不是user index condition,也不是null
Tags
Annotators
URL
-
-
funnylog.gitee.io funnylog.gitee.io
-
普通索引和change buffer的配合使用,对于数据量大的表的更新优化还是很明显的
Tags
Annotators
URL
-
-
time.geekbang.org time.geekbang.org
-
然后提交
Tags
Annotators
URL
-
-
funnylog.gitee.io funnylog.gitee.io
-
version被其他事务抢先更新
version拿到最新的当前值
-
事务B是当前读,必须要读最新版本,而且必须加锁,因此就被锁住了,必须等到事务C’释放这个锁,才能继续它的当前读。
Tags
Annotators
URL
-
-
juejin.cn juejin.cn
-
update t set a = a + 1;
当前事务变更后,可重复读拿到的就是更新的数据
Tags
Annotators
URL
-
-
funnylog.gitee.io funnylog.gitee.io
-
最可能造成锁冲突、最可能影响并发度的锁的申请时机尽量往后放
-
-
funnylog.gitee.io funnylog.gitee.io
-
事务中的MDL锁,在语句执行开始时申请,但是语句结束后并不会马上释放,而会等到整个事务提交后再释放。
mdl只有在事务之后才会释放
-
比较理想的机制是,在alter table语句里面设定等待时间,如果在这个指定的等待时间里面能够拿到MDL写锁最好,拿不到也不要阻塞后面的业务语句,先放弃
等待
-
使用参数–single-transaction的时候,导数据之前就会启动一个事务,来确保拿到一致性视图。而由于MVCC的支持,这个过程中数据是可以正常更新的。
-
-
stackoverflow.com stackoverflow.com
-
SET collation_connection = 'utf8_general_ci';
编码
-
-
funnylog.gitee.io funnylog.gitee.io
-
第一原则是,如果通过调整顺序,可以少维护一个索引,那么这个顺序往往就是需要优先考虑采用的
Tags
Annotators
URL
-
-
funnylog.gitee.io funnylog.gitee.io
-
恢复目标时间
-
select * from information_schema.innodb_trx where TIME_TO_SEC(timediff(now(),trx_started))>60
-
就是当系统里没有比这个回滚日志更早的read-view的时候
疑惑点
-
MySQL的隔离级别设置为“读提交
mysql默认是可重复读
-
创建一个视图
-
一个事务执行过程中看到的数据,总是跟这个事务在启动时看到的数据是一致的
非所有数据,而是所读取行
Tags
Annotators
URL
-
-
cloud.tencent.com cloud.tencent.com
-
幻读是读取了其他事务新增的数据,针对insert和delete操作
可重复读
Tags
Annotators
URL
-
-
funnylog.gitee.io funnylog.gitee.io
-
感觉oracle的DG就诞生了,物理的速度也将远超逻辑的,毕竟只记录了改动向量
-
redo log和binlog都可以用于表示事务的提交状态,而两阶段提交就是让这两个状态保持逻辑上的一致
如果中间出现事故,mysql会做相应处理两阶段提交
-
-
funnylog.gitee.io funnylog.gitee.io
-
数据表和数据列是否存在, 别名是否有歧义等。如果通过则生成新的解析树,再提交给优化器
-
参数wait_timeout
连接超时时间
-
-
blog.csdn.net blog.csdn.net
-
Binlog日志保留时长
Tags
Annotators
URL
-
-
-
mysqld
开启binlog
Tags
Annotators
URL
-
- Mar 2022
-
Local file Local file
-
www.cnblogs.com www.cnblogs.com
-
由图中可看到,每种设备都有两个指标: - 延时(响应时间):表示硬件的突发处理能力; - 带宽(吞吐量):代表硬件持续处理的能力。
-
大多数情况,性能最慢的设备会是瓶颈点。
如,下载时网络速度可能会是瓶颈点,本地复制文件时硬盘可能是瓶颈点。
为什么这些一般的工作能快速确认瓶颈点呢?
因为我们队这些慢速设备的性能数据有一些基本的认识,如网络带宽是 2 Mbps,硬盘是每分钟 7200 转等等。
(结论)因此,为了快速找到 SQL 的性能瓶颈点,需要了解计算机系统的硬件基本性能指标,如当前主流计算机性能指标数据。
-
数据库访问优化法则
(目的):要正确的优化 SQL;
(条件):需要快速定位性能的瓶颈点;
(进一步阐释说明):即是快速找到 SQL 主要的开销在哪里?
-
- Oct 2021
-
stackoverflow.com stackoverflow.com
-
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
This fixed MySQL issues when installing Ghost on Ubuntu 20.04 on DigitalOcean.
-
- Jun 2021
-
smallstep.com smallstep.com
-
The alternative for curl is a credential file: A .netrc file can be used to store credentials for servers you need to connect to.And for mysql, you can create option files: a .my.cnf or an obfuscated .mylogin.cnf will be read on startup and can contain your passwords.
- .netrc <--- alternative for curl to store secrets
- .my.cnf or .mylogin.cnf <--- option files for mysql to store secrets
Tags
Annotators
URL
-
- May 2020
-
www.essentialsql.com www.essentialsql.com
-
I think you should normalize if you feel that introducing update or insert anomalies can severely impact the accuracy or performance of your database application. If not, then determine whether you can rely on the user to recognize and update the fields together. There are times when you’ll intentionally denormalize data. If you need to present summarized or complied data to a user, and that data is very time consuming or resource intensive to create, it may make sense to maintain this data separately.
When to normalize and when to denormalize. The key is to think about UX, in this case the factors are db integrity (don't create errors that annoy users) and speed (don't make users wait for what they want)
-
Can database normalization be taken too far? You bet! There are times when it isn’t worth the time and effort to fully normalize a database. In our example you could argue to keep the database in second normal form, that the CustomerCity to CustomerPostalCode dependency isn’t a deal breaker.
Normalization has diminishing returns
-
Now each column in the customer table is dependent on the primary key. Also, the columns don’t rely on one another for values. Their only dependency is on the primary key.
Columns dependency on the primary key and no dependency on other columns is how you get 2NF and 3NF
-
A table is in third normal form if: A table is in 2nd normal form. It contains only columns that are non-transitively dependent on the primary key
3NF Definition
-
- Dec 2019
-
unix4lyfe.org unix4lyfe.orgTime1
-
if you care at all about storing timestamps in MySQL, store them as integers and use the UNIX_TIMESTAMP() and FROM_UNIXTIME() functions.
MySQL does not store offset
-
- Jul 2019
-
wpbeaches.com wpbeaches.com
-
WordPress Database Switcheroo First, do a MySQL database export of the old database on the old server, create a new blank database on the new server, import the old data either in PHPMyAdmin or mysql directly in the command line. Make sure you have the new database selected, then run some SQL updates and replacement commands on the tables notably, wp_options, wp_posts, wp_postmeta. Use the code as below and swap in your old and new URLs, no trailing slashes. Also if necessary change the table prefix values where applicable (ie wp_ ) UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
This is really helpful when you're manually cloning a WP site. If you have a Domain of One's Own and you want to move a site from one user's account to another or fork a site into another user's account, this is really helpful.
-
- Apr 2019
- Mar 2019
-
www.thedevelopersconference.com.br www.thedevelopersconference.com.br
-
DBA Por Acaso: RDS, MySQL e Tuning para Iniciantes
Outro assunto que não é explicitamente coberto por nossos tópicos, mas que é base importante para o administrador de sistemas na nuvem - e aqui coberto em um nível introdutório, para não assustar ninguém. E procura por Cloud em https://wiki.lpi.org/wiki/DevOps_Tools_Engineer_Objectives_V1 para ver como esse assunto é importante!
-
- Jan 2018
- Oct 2017
-
eng.uber.com eng.uber.com
-
MySQL’s replication architecture means that if bugs do cause table corruption, the problem is unlikely to cause a catastrophic failure.
I can't follow the reasoning here. I guess it's not guaranteed to replicate the corruption like Postgres would, but it seems totally possible to trigger similar or identical corruption because the implementation of the logical statement would be similar on the replica.
Tags
Annotators
URL
-
- Mar 2015
-
stackoverflow.com stackoverflow.com
-
My current process for debugging stored procedures is very simple. I create a table called "debug" where I insert variable values from the stored procedure as it runs. This allows me to see the value of any variable at a given point in the script, but is there a better way to debug MySQL stored procedures?
facing a similar issue
-