Report Manager mysql command - use reporting - takes over 30 min.

Document ID : KB000127075
Last Modified Date : 14/02/2019
Show Technical Document Details
Issue:
Customer noticed that when logging into MySql and running the command:
./mysql --defaults-file=../my-spectrum.cnf -uroot -proot

... was able to login to MySql, but then to login to the Reporting DB with:
use reporting;

... that it will take over 30 min. to get back the prompt.

What is the reason and solution to get this faster.
Resolution:
When you type "use database" it will load the metadata, columns, tables, etc.

Often seen when there are a lot of bucket tables as well.

Customer need to:
1. Clean up the database (don't store as much)
2. Optimize the database
3. For now they can send "-A" to the mysql connect command to prevent loading of the metadata.

Customer used the "-A" option to login to mysql reporting database.

./mysql --defaults-file=../my-spectrum.cnf -uroot -proot reporting -A

Now, the login to the reporting DB is quicker (seconds).