Perl can handle very big data structures - your constraint will be physical memory.

However, what you are looking to do is what RDBMs are designed to do well. You should use SQL to get the results you want ( this is MySQL dialect, look up the proper syntax for joins on your own system): 1 SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.key = t2.key WHERE t2.key IS NULL 2 SELECT t2.* FROM t1 LEFT JOIN t2 ON t2.key = t1.key WHERE t1.key IS NULL 3SELECT t1.* FROM t1, t2 WHERE t1.key = t2.key AND NOT t1.content = t2.content 4 SELECT t1.* FROM t1, t2 WHERE t1.key = t2.key AND t1.field1 = t2.field1 AND... Of all these, only #3 may be tricky, if you don't have a specific field whose value you can check. But even there I suspect there is a clean SQL solution that will work faster than Perl. If in doubt, benchmark and see how it goes.

In reply to Re: SQL vs Perl table comparing by FamousLongAgo
in thread SQL vs Perl table comparing by LiTinOveWeedle

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.