What about having two tables. One would be a kind of staging ground. You process all the records into it store them. It has a unique primary key instead of the timestamp. Then use that table to load up your summed by timestamp table, and clear out the temp table. When inserting records then you could load multiple records per insert statment (i think i settled on like 100 records per insert for a table I have with 20 colums, so you could probably manage many more than that.) Weather you realy need the extra table or not will depend on the quantity of records you are processing every 15 minutse.

Yet another optiuon would be to use the INSERT ON DUPLICATE KEY UPDATE syntax to have it sum them as it adds them. You could even right all those inserts into a text file then load the text file in mysql.

Good luck.


___________
Eric Hodges

In reply to Re: DBI vs Bulk Loading by eric256
in thread DBI vs Bulk Loading by jimbus

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.