Exporting table with TEXT column is HUGE!

  • This may be a newbie question but here goes...

    I am trying to export a table containing a TEXT data field to a fixed-width text file. The table only contains about 50K records but it is creating an outrageously large file! I have let it run for over an hour and it reports to be about 14K records into the process. However, the filesize is over 20 GB!

    Am I missing a painfully obvious issue here? Why is it that this file is so large? The TEXT field could contain a large amount of data but running a query to determine the max(DATALENGTH()) produced 3500. It would seem that it should not be taking this long or creating such a large file.

    Can somebody point out what I can do to fix this issue? I have many more tables to export for archiving with the exact same structure.

    Kind regards,

    Steve

  • This issue can be sorted out by using delimited file format if you are not specified to use Fixed width file format. This problem occours because in fixed width a specified amount of blank space is allocated in case of text data type which is causing the size of the file as well as the DTS process to get delayed.

    Cheers

    Amit

    Amit Tiwari
    Software Engineer
    Westbase Technology Pvt Ltd
    Pune

  • I feel a moment of enlightenment coming over me. That makes perfect sense! Thanks!

    Steve

  • The fixed width for a TEXT field is 2GB.

    A quick test with only 14 records and c. 20 characters in each TEXT field produces a download of 44Mb.  Not quite what you would expect for such a small amount of text.

    -------------------------------------------------------------------------
    Normal chaos will be resumed as soon as possible. :crazy:

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply