What causes Duplicated Queries and how do I prevent it?

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
fkisserh
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jan 03, 2019 12:29 pm

What causes Duplicated Queries and how do I prevent it?

Post by fkisserh » Mon Sep 20, 2021 1:24 pm

Anytime I enable debug mode in global configuration, I see a duplicated queries section under
Database Queries Tab as shown in the attached image
JoomlaScreenshot.png
.

I will like to know :

Are these normal?
Does every Joomla site have them?
Can I get rid of them?
How do I prevent these duplicated queries?

I see this on every single Joomla Site I have created in the last 5 years. Even on freshly installed sites without any extensions. Are they deliberate?
You do not have the required permissions to view the files attached to this post.

User avatar
simplesource
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Wed Jul 15, 2009 7:59 pm
Location: Georgia
Contact:

Re: What causes Duplicated Queries and how do I prevent it?

Post by simplesource » Mon Sep 20, 2021 3:22 pm

The debug plugin is cloning the session data when building an output for each page, which requires re-initializing any stored information including a user's serialized JUser object. I would just ignore it and move on.
Simple Source Solutions - https://getsimple.net/joomla-hosting/
Managed Joomla Hosting by Joomla pros

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2000
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: What causes Duplicated Queries and how do I prevent it?

Post by SharkyKZ » Mon Sep 20, 2021 3:53 pm

You can click on "Call Stack" next to each query to find out exactly where it's coming from.
It's normal to have some duplicate queries in backend and a few in frontend. It really depends on exact page, enabled plugins and modules, their options.
Duplicate queries can generally be reduced by improving the code. Not in all cases though. Without making code changes, you can enable cache, remove or disable unneeded extensions.


Post Reply

Return to “Performance - Joomla! 3.x”