当前位置:百科知识 > 知到宏观经济学答案

问题描述:

[单选] The ‘allplicationdb’ is using innoDB and consuming a large amount of file system space. You have a /backup partition available on NFS where backups are stored. You investigate and gather the following information:“allplicationdb”正在使用innoDB并消耗大量的文件系统空间。在存储备份的NFS上有一个/backup分区。您调查并收集以下信息:You attempt to free space from ibdata1 by taking a mysqldump of the data_archive table and storting it on your backup partition.尝试将数据从mysqlu分区转储到mysqlu分区。Which set of actions will allow you to free disk space back to the file system?哪一组操作将允许您将磁盘空间释放回文件系统?
A.Execute OPTIMIZE TABLE so that the InnoDB engine frees unused pages on disk back to the file system: mysql> OPTIMIZE TABLE data_current, data_reports; B.Set the server to use its own tablespace, and then alter the table so that data is moved from the shared tablespace to its own: mysql> SET GLOBAL innodb_file_per_table=1; Mysql> ALTER TABLE data_current ENGINE=InnoDB; Mysql> ALTER TABLE data_repors ENGINE=InnoDB; C.Take a backup, stop the server, remove the data files, and restore the backup: Shell> mysqldump –uroot –p applicationdb > /backup/applicationdb.sql Shell> /etc/init.d/mysql stop Shell> cd /var/lib/mysql/ Shell> rm ibdata1 ib_logfile0 ib_logfile1 Shell> /etc/init.d/mysql start Shell> mysql -u root –papplicationdb < /backup/applicationdb.sql D.Enable compression on the table, causing InnoDB to release unused pages on disk to the file system: Mysql> SET GLOBLE innodb_file_per_table=1; Mysql> SET GLOBLE innodb_file_format=Barramcuda; Mysql> ALTER TABLE data_current ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; Mysql>ALTER TABLE data_history ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
参考答案:查看
答案解析:
☆收藏

随机题目