What effect does the – order-by-primary argument have on the mysqldump command?

You have table ‘apps’,’userdata’ on server that uses MyISAM storage engine. You want to transfer
this data to server but use InnoDB engine instead.
You execute the following commands:
ServerB commands:
Shell> mysqldump –u root –h server –no-data apps userdata | mysql –u root –p apps
Shell> mysql –u root –p –h server –e ‘ALTER TABLE ‘apps’,’userdata’ ENGINE=InnoDB;’
Shell> mysqldump –u root –p –h server –no-create-info –order-by-primary apps userdata | mysql
–u root –p apps
What effect does the – order-by-primary argument have on the mysqldump command?

You have table ‘apps’,’userdata’ on server that uses MyISAM storage engine. You want to transfer
this data to server but use InnoDB engine instead.
You execute the following commands:
ServerB commands:
Shell> mysqldump –u root –h server –no-data apps userdata | mysql –u root –p apps
Shell> mysql –u root –p –h server –e ‘ALTER TABLE ‘apps’,’userdata’ ENGINE=InnoDB;’
Shell> mysqldump –u root –p –h server –no-create-info –order-by-primary apps userdata | mysql
–u root –p apps
What effect does the – order-by-primary argument have on the mysqldump command?

A.
It exports tables with the most indexes first to assist with import speeds.

B.
It ensures that unique indexes have no conflicts when the data is dumped.

C.
It orders by primary key to assist in speeding up importing to InnoDB tables.

D.
It must be specified so index data is dumped correctly when –on-create-info is used.

Explanation:



Leave a Reply 4

Your email address will not be published. Required fields are marked *


jeanrock

jeanrock

should be C
–order-by-primary Sorts each table’s rows by primary key, or first unique
key, if such a key exists. Useful when dumping a MyISAM
table to be loaded into an InnoDB table, but will make
the dump itself take considerably longer.