mysql ocp 1z0-888 每日一题(5)

10月5号

After analysis on the slow query log on a high-end OLTP service, the table identified in the slow
queries is:

What are the two most likely reasons for the slowness given this output?
A. The User field is too long for most names.
B. Date should be a TIMESTAMP field for better performance.
C. The engine type is not appropriate to the application use.
D. No indexes are defined.
E. Using default values for DATETIME causes table scans.

解析:

字段名不长,不会影响性能的

timestamp的确比datatime少4字节(只有4字节),但是影响不大

如果是oltp系统,并发大的情况下不适用myisam引擎,因为写入会阻塞读操作,造成大量业务积压

没有索引可能会造成读缓慢

使用默认值不会造成表扫描的
Answer: C,D

猜你喜欢

转载自blog.csdn.net/AkiFreeman/article/details/84983309