use database 很慢/You can turn off this feature to get a quicker startup with –A
mysql> use information_schema
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
?
當切換到某個庫時,經常會出現上面信息,意思是預讀這個庫中表以及表列信息。
但是當庫中表很多,表中數據很大時,就會出現執行use <庫名>后半天沒反應,連接很慢的情況
?
解決辦法:
上面其實已經有提示了(You can turn off this feature to get a quicker startup with -A)
就是在登陸連接mysql時使用-A參數,這樣就不會預讀庫中表信息了,能提高連接庫的速度.
?
shell>?mysql -h hostname -u username -P port -p -A
Enter password:
MySQL -A參數含義:
shell>?mysql --help
? -A, --no-auto-rehash
????????????????????? No automatic rehashing. One has to use 'rehash' to get?table and field completion.
????????????????????? This gives a quicker start of?mysql and disables rehashing on reconnect.
?
例子:
shell>?mysql -h?127.0.0.1 -u?root -P 3306 -p
Enter password:
mysql> use information_schema;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> exit
Bye
?
shell>?mysql -h?127.0.0.1 -u?root -P?3306 -p
Enter password:
mysql> use information_schema;
Database changed
?
?
總結
以上是生活随笔為你收集整理的use database 很慢/You can turn off this feature to get a quicker startup with –A的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python程序中止和恢复_用来中止进程
- 下一篇: apollo学习之---planning