Hi All,

I'm doing some processing in perl to determine which records I want to delete - I end up with a list of about 20,000 (in a database of around 200,000 records)

I tried doing the delete in perl (prepare the delete query then itterate round the list executing with each value) and the performance is terrible.

In the end I wrote the values to a file, used the sybase bulk copy tool to throw them into a temporary table and did a "delete from table where id in (select id form temp table)"

The performance is much better (4 seconds vs about 10 minutes) but it just feels like a bit of a hack

Anyone know a way to improve the performance of this type of opperation staying within perl?

Thanks

simm

In reply to Perl DBI (sybase) rapidly delete large number of records by simm42

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.