I'm totally a MySQL rookie but I would recommend using a text (upto 64k) or longtext (upto 4GB) if I was reading any textual file because the text types are searchable within SQL with their own flavor of regexes. Although they're not as nice as Perl's, they may be faster on their own data (especially if it's large data like longtext) because it won't have to all be duplicated in memory into a scalar for Perl to examine.

A blob is basically for binary data as I understand it. If you wanted to store image files (or sounds) in your database, that would probably be the best place to store them. I guess a simple answer is: If the file you wish to import contains binary data, use the blob type and use text for anything else. I hope this helps. TTFN & Shalom.

-PipTigger

p.s. Initiate Nail Removal Immediately!


In reply to RE: Importing files with perl::dbi by PipTigger
in thread Importing files with perl::dbi by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.