|
Posted by NC on 05/13/07 20:35
On May 10, 8:39 am, Ciaran <cronok...@hotmail.com> wrote:
>
> Is it faster to have mySql look up as much data as possible
> in one complex query or to have php do all the complex
> processing and submit lots of simple queries to the mysql
> database?
It depends. There is a fixed per-query overhead, so, other things
being equal, one query would be executed faster than several queries.
But other things are not necessarily equal. Sometimes (not very often
though), there may be be an awkward join or ORDER BY clause, which
could be streamlined or even eliminated if you split your query into
two...
Cheers,
NC
[Back to original message]
|