Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Just permanent table for this use? I've done this when I wanted something I was doing repeatedly to go the fastest possible. I found there was some overhead to creating the temporary table, so I just created a permanent table and reused it.
    • That's the work around that I've done for now. Unfortunately it's a fair bit slower than the temporary table system, because it has to have an extra column (pid), which has to be permanently indexed, thus inserts are slower, and selects and updates are slower because they have to use the index. Nuts.
      • It's been a few years since I did that app where I replaced a temporary table with a permanent one and I recall that there were other advantages to making the data (semi-)permanent.

        I recall now that the real speedup was that the data was time-tagged. I had been performing big selects against the database for data, inserting data from a time range in the temporary table and performing reports off of this. I was able to take advantage of the fact that subsequent runs would need data mostly in the same time range and I could perform a smaller select off of the big database on subsequent reports if I kept data from the last pass around.

        It was a multi-processor system with lots of disks and I found I could delete the data I didn't need from the "working" tables at the same time I was performing the select off of the big databases and inserting this data into the "working" tables quite a bit faster than I could do those two operations (delete from "working" table, insert into "working" table from big databases) serially. This overlapping reduced wall-clock time of the operation significantly.