We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Ami, I've just been looking at a few plugins to see how fast they are. This one does seem pretty good for speed, but I did notice one issue here: https://github.com/amiyasahu/q2a-breadcrumbs/blob/master/inc/Ami_Breadcrumb.php#L126
You are running SQL queries inside a loop so with nested categories I end up with 4 queries:
SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags='parentcategory' SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags='cat2' SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags='cat3' SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags='cat4'
This could be replaced with a single query like this:
SELECT categoryid, parentid, title, tags, qcount, content, backpath FROM qa_categories WHERE tags IN ('parentcategory', 'cat2', 'cat3', 'cat4')
And then loop through the results to get the info you need. Hope that helps :)
The text was updated successfully, but these errors were encountered:
@svivian , Thank you for reporting the issue. I will fix it this weekend.
Sorry, something went wrong.
22a4429
No branches or pull requests
Hi Ami, I've just been looking at a few plugins to see how fast they are. This one does seem pretty good for speed, but I did notice one issue here: https://github.com/amiyasahu/q2a-breadcrumbs/blob/master/inc/Ami_Breadcrumb.php#L126
You are running SQL queries inside a loop so with nested categories I end up with 4 queries:
This could be replaced with a single query like this:
And then loop through the results to get the info you need. Hope that helps :)
The text was updated successfully, but these errors were encountered: