Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which command is the fastest among the following ?

  • A.COPY TO \(\lt\)NEW FILE\(\gt\)
  • B.COPY STRUCTURE TO \(\lt\)NEW FILE\(\gt\)
  • C.COPY FILE \(\lt\)FILE 1\(\gt\) \(\lt\)FILE 2\(\gt\)
  • D.COPY TO MFILE-DAT DELIMITED

Answer: B

The fastest of the four is COPY STRUCTURE TO <NEW FILE>.

It copies only the structure of the table, that is the field names, types and widths, and no records, so it has the least data to write. COPY TO <NEW FILE> (A) copies the whole table with all its records, COPY FILE (C) copies the full file at the operating system level, and COPY TO ... DELIMITED (D) copies every record and converts it into a text file, so the last is the slowest. The time taken rises with the amount of data written.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.