use database 切換提示You can turn off this feature to get a quicker startup
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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70000068/viewspace-2777491/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- REST is not enabled. use -rest to turn onREST
- Upon startup of Linux database get ORA-27102LinuxDatabase
- How to Turn Archiving ON and OFF in Oracle RDBMS [ID 69739.1]Oracle
- Entity Framework Code-First(18):Turn off DB InitializerFramework
- When to Use Startup / Shutdown DB and Alter Database Command in 12c_1582453.1Database
- Use Database Replay Feature to Help With Upgrade From 10.2.0.4 to 11g_748895.1Database
- ORA-38760: This database instance failed to turn on flashback databaseDatabaseAI
- why you can be in netherland
- Physical Standby Database 切換到 Snapshot Standby DatabaseDatabase
- Please add or free up more resources then turn off safe mode manually.
- Restricting Access to a Database at StartupRESTDatabase
- 【MySQL】ERROR 1093 You canMySqlError
- Overview of Instance and Database Startup (289)ViewDatabase
- You want to use parallel processes for a client copy.Parallelclient
- ORA-38760: This database instance failed to turn on flashback database 第三篇DatabaseAI
- ORA-38760: This database instance failed to turn on flashback database 錯誤解決DatabaseAI
- Oracle Database Change Data Capture featureOracleDatabaseAPT
- you cannot use this control in design mode。
- For example, when you want to get the ball to the ground
- JavaScript’s “this”: how it works, where it can trip you upJavaScript
- Can one rename a database user (schema)?Database
- Troubleshooting Database Control Startup IssuesDatabase
- Oracle Database 12C New FeatureOracleDatabase
- Get yourself a femdom Superior If you are truly submissive in ShanghaiAI
- How to use rman backup a noarchivelog databaseHiveDatabase
- Exclusive access could not be obtained because the database is in useAIDatabase
- You can‘t specify target table ‘Person‘ for update in FROM clause
- 如何在MySQL資料庫中使用use來切換資料庫?MySql資料庫
- 巧用flashback database實現靈活的資料切換Database
- fuse: mountpoint is not empty fuse: if you are sure this is safe, use the ‘nonempty‘ mount optionNone
- crontab工具報錯crontab:you are not authorized to use cron.Sorry.Zed
- QUESTION :What kind of shared storage do you use for Oracle RAC?Oracle
- What Happens When You Open a Database (297)APPDatabase
- Composer 建立專案 You can also run `PHP --INI`PHP
- mysql中You can’t specify target table for update in FROM clMySql
- Microsoft's AI-powered app can help you learn ChineseROSAIAPP
- S2 - Lesson 57 - Can I help you, madam?
- How to use the Automatic Database Diagnostic Monitor(一)Database