It would be difficult to give a useful answer with the information provided. What number of queries is currently making you hesitate?

The number of queries can cause overhead due to the round-trip delay, but this will depend on a number of factors.

But using monolithic queries can also cause overhead. If you can provide more information about the way you use the database we can likely offer areas to improve upon.

But honestly the best way to see which approach works best for you is to benchmark it. Optimizing before you identify the bottlenecks can absorb a huge amount of your development time with very little return on the investment.

I'm very fond of using Benchmark to determine which algorithm runs fastest, but this is only part of the problem in your case. You really need to see how well it performs when the load is as high as you fear it might become.


In reply to Re: How many Select Querie is considered too much? by imp
in thread How many Select Querie is considered too much? by Anonymous Monk

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.