|
Posted by Dr.Zoidberb on 11/22/06 15:46
There is no "proper" way for all systems. You have to strike a balance
that works for your system. The query cache stores the results of
queries and returns the stored result rather than performing the query
again, provided the tables underneath have not changed.
So if all of your tables update infrequently then you would be able to
get some performance gains out of combining all your queries into one.
However, if one of those tables updates frequently that same combined
query could potentially decrease performance depending on the
complexity of the joins. If some update frequently and some don't then
you could get some gain combining the queries that update infrequently,
and leaving the others alone.
See where I'm going? It's database specific. You need to analyze how
often things update to see whether or not you might gain something by
combining queries. Like others have said, you also have to keep in mind
maintenance.
Navigation:
[Reply to this message]
|