Dearest Monks,

I'm seeking validation and the experiences of others.

I'm creating a content management system and having difficulty with SQL stuff, mainly I have so many properties that I have to take into account that the SQL statements are wicked complicated, and I've spent the last couple of days working on them to no avail. I was trying to do everything with 1 statement, and it just wasn't happening.

I'm creating a complicated reference based data structure, to be passed to a recursive HTML::Template loop. I then got to thinking that I'm going about it the wrong way. Incurring a DBI hit, or multiple DBI hits, would top out my script in terms of performance no matter what.

My thoughts are to create my data structures every five minutes or so with a cron-tabbed script, storing them with Storable, and then opening them in my display module, saving on the DBI overhead.

I'm expecting a bunch of concurrent connections. Assuming I use file locking properly, will this be OK? The Cookbook has a great description of how to get this to work, and I'll probably generalize it into a subroutine.

My questions:

  1. If you've done something similar, what was your experience?
  2. What should I be looking out for, in terms of traps/pitfalls?
  3. Is there a better way to store this than using Storable?
  4. Am I making this too complicated?

-Any sufficiently advanced technology is
indistinguishable from doubletalk.


In reply to mySQL hits or Storable retrieves? by Hero Zzyzzx

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.