数据库级别的优化
来源:互联网 发布:托拜厄斯哈里斯数据 编辑:程序博客网 时间:2024/04/28 07:49
Optimizing at the Database Level
The most important factor in making a database application fast is its basic design: --优化关键在于基本设置
Are the tables structured properly? In particular, do the columns have the right data types, and does each table have the appropriate columns for the type of work? For example, applications that perform frequent updates often have many tables with few columns, while applications that analyze large amounts of data often have few tables with many columns. --设置正确的列数据类型,不同应用设置不同的表列(数量),例如:频繁更新的应用要表多列少,大数据分析应用要表少列多。
Are the right indexes in place to make queries efficient? --index
Are you using the appropriate storage engine for each table, and taking advantage of the strengths and features of each storage engine you use? In particular, the choice of a transactional storage engine such as
InnoDB
or a nontransactional one such asMyISAM
can be very important for performance and scalability. --为每个表选择适当的存储引擎,事务性存储引擎--innodb, 非事务性存储引擎--myisamDoes each table use an appropriate row format? This choice also depends on the storage engine used for the table. In particular, compressed tables use less disk space and so require less disk I/O to read and write the data. Compression is available for all kinds of workloads with
InnoDB
tables, and for read-onlyMyISAM
tables. --根据表所使用的存储引擎为表选择合适的行格式(compressed 表,节省表空间,从而读写磁盘I/O少,compressed 对所有Innodb表生效,对只读myisam表有效)
Does the application use an appropriate locking strategy? For example, by allowing shared access when possible so that database operations can run concurrently, and requesting exclusive access when appropriate so that critical operations get top priority. Again, the choice of storage engine is significant. The
InnoDB
storage engine handles most locking issues without involvement from you, allowing for better concurrency in the database and reducing the amount of experimentation and tuning for your code. --锁定策略Are all memory areas used for caching sized correctly? That is, large enough to hold frequently accessed data, but not so large that they overload physical memory and cause paging. The main memory areas to configure are the
InnoDB
buffer pool, theMyISAM
key cache, and the MySQL query cache. --合理设置缓存
- 数据库级别的优化
- 数据库百万级别的sql优化
- 百万级别数据库优化技巧
- 数据库事务隔离级别与索引的优化
- mysql 数据库的事务隔离级别及mysql 索引优化
- 汇编级别的优化
- 硬件级别的优化
- 阿里级别的优化
- 数据库的隔离级别
- 数据库的隔离级别
- 数据库事务的级别
- 数据库的隔离级别
- 数据库的隔离级别
- 数据库的隔离级别
- 数据库的隔离级别
- 数据库的隔离级别
- 数据库的隔离级别
- 数据库的隔离级别
- 英特尔欲斥资100多亿美元并购Altera?
- online panel在广告曝光日志中的特征进一步提取
- 抽象类和接口的区别
- vs2008中打了SP1补丁包,给工具栏按钮单独贴位图(注意:是“单独”,也就是有多张图)
- Java并发编程:synchronized
- 数据库级别的优化
- [Material Design] 教你做一个Material风格、动画的按钮(MaterialButton)
- mysql分组查询聚合函数
- MPAndroidChart开源图表库(三)之柱形图
- 关于C++/JAVA类中的static成员和对象成员的说法正确的是:
- 计蒜客 22题 排序后的数组删除重复数字
- PostgreSql中WITH语句的使用
- 添加第三方类库造成的Undefined symbols for architecture i386:编译错误
- 常用ARM汇编指令