Duplicate queries are only really an issue with very expensive queries
and/or queries that are executed very often. With that I mean not only
several times per pageload, but on each pageload. Since you have a ratio
of maybe 1 edit view per 10,000 pageviews, duplicate queries in that
regard are neglectable and not really something to worry about. However,
if we are talking about loading the component parameters of a component
for example, executing the same query each time actually does get
expensive, since a standard Joomla page retrieves maybe 4-7 different
component parameter sets. Since it does that on each pageload, we have
70,000 queries per 10,000 pageloads. In the edit view case however, we
would only have 2 additional queries per 10,000 pageloads. So if you
optimize the system to only load the component parameters once per
pageload for all components, you are able to optimize away 60,000
additional queries per 10,000 pageloads.
Long story short: duplicate queries in the backend are neglectable,
duplicate queries in the frontend should only concern you if they are on
almost every pageload and they are either very expensive or there are
more than 2 duplicates.
Hannes
Am 07.06.2015 um 18:17 schrieb Sergio Manzi:
> Viper,
>
> from the image there isn't much I can tell...
>
> What would be interesting is to have the "Call stack" for each of the
> duplicated queries.
>
> In any case, as they say, "/your mileage may vary/", and not two sites
> are the same and hence do not generate the same workload (/executed
> queries/).
>
> I guess *some *duplication is inevitable as parametric queries are
> executed in different contexts and they just "/happens/" to be the
> same because called with the same parameters (/but in other situation
> they might be called with different parameters/).
> ... or, I think, we should "cache" our queries at an upper level
> (driver.php) based on the /hash /of the queries themselves.
>>>> *Without Alt tags**generation:*
>>>> 1 series of 6 duplicated queries
>>>> all brings back to
>>>> JROOT\administrator\components\com_languages\helpers\multilangstatus.php:94
>>>>
>>>> *With Alt tags generation:*
>>>> 2 series: of duplicated queries:
>>>> 1st: like above, but 9 queries
>>>> 2nd: 2 queries bringing back to
>>>> JROOT\plugins\system\languagefilter\languagefilter.php:608
>>>> and then to
>>>> JROOT\administrator\components\com_menus\helpers\menus.php:283
>>>>
>>>> I think I can fix the first series quite easly: hold on for
>>>> a PR
>>>> Unsure about the second... have to look...
>>>>
>>>> What are the sources of your duplicated queries?
>>>>
>>>> Thanks!
>>>>
>>>> Sergio
>>>>
>>>>
>>>> On 2015-06-07 05:57, Robert G Mears wrote:
>>>>> @Sergio Manzi
>>>>>
>>>>> Debug is on for this site -- albeit temporarily -- J!
>>>>> TUTOR <
http://www.tutor.studiofive.biz/>.
>>>>>
>>>>> It says (under Database Queries):
>>>>>
>>>>>
>>>>> 8 duplicate found!
>>>>>
>>>>> 2 duplicates: #2
>>>>> <
http://www.tutor.studiofive.biz/#dbg-query-2> #23
>>>>> <
http://www.tutor.studiofive.biz/#dbg-query-23>
>>>>> 3 duplicates: #13
>>>>> <
http://www.tutor.studiofive.biz/#dbg-query-13> #16
>>>>> <
http://www.tutor.studiofive.biz/#dbg-query-16> #25
>>>>> <
http://www.tutor.studiofive.biz/#dbg-query-25>
>>>>> 3 duplicates: #14
>>>>> <
http://www.tutor.studiofive.biz/#dbg-query-14> #17
>>>>> <
http://www.tutor.studiofive.biz/#dbg-query-17> #26
>>>>> <
http://www.tutor.studiofive.biz/#dbg-query-26>
>>>>> <
http://groups.google.com/group/joomla-dev-cms>.
>>>>> <
https://groups.google.com/d/optout>.
>>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Joomla! CMS Development" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to
joomla-dev-cm...@googlegroups.com
>> <mailto:
joomla-dev-cm...@googlegroups.com>.
>> <mailto:
joomla-...@googlegroups.com>.
> <mailto:
joomla-dev-cm...@googlegroups.com>.
> <mailto:
joomla-...@googlegroups.com>.