
Fix MySQL/MariaDB query where limit of 61 tables is hit
- or -
Post a project like this£150(approx. $200)
- Posted:
- Proposals: 14
- Remote
- #2458725
- OPPORTUNITY
- Expired
Full-time freelancer having 8+ years of expertise in PHP, Wordpress, Codeigniter, Shopify, Laravel & Magento frameworks

Full-stack web developer, PHP, MySQL, Mobile App, AWS, Linux, Node.js, Vue.js, MongoDB, Joomla, Wordpress, E-Commerce, Git

Full Stack Lead Developer - PHP - Javascript - Laravel - Vue.js - MySQL - TailwindCSS +_+

PHP, Opencart, Reactjs, AngularJs, Phonegap, Nodejs, Mongodb, codeigniter, Mysql
Expert in php python devops nodejs OpenAI AIML AWS microservices docker shopify wordpress & k8 reactjs fastapi django flask yii cakephp laravel DS AIML data Analyst javascript perl Rest Api wordpress

246148916063072675553899526907490638499104338919276212809192664828784622954708





Description
Experience Level: Intermediate
I am trying to get data out of a system whereby the way the data is stored means I have to join individual fields to table instances to get the data - this works but once the data set increases we hit the limit of:
#1116 - Too many tables; MariaDB can only use 61 tables in a join
I found an article on Stackoverflow which talks about using sub-queries to overcome this so I think it is possible (https://stackoverflow.com/questions/11953995/does-the-limit-on-the-maximum-number-of-sql-join-tables-apply-to-the-whole-query/20134402#20134402) but I am not able to get it to work.
I cannot reduce the field numbers or table numbers hence the join numbers so if anyone is confident they can do this using sub-queries or unions then please get in touch. Basically, I have 70+ joins at the moment and I need to be able to get all the data out in a single query.
Sanitised version of the query is attached
#1116 - Too many tables; MariaDB can only use 61 tables in a join
I found an article on Stackoverflow which talks about using sub-queries to overcome this so I think it is possible (https://stackoverflow.com/questions/11953995/does-the-limit-on-the-maximum-number-of-sql-join-tables-apply-to-the-whole-query/20134402#20134402) but I am not able to get it to work.
I cannot reduce the field numbers or table numbers hence the join numbers so if anyone is confident they can do this using sub-queries or unions then please get in touch. Basically, I have 70+ joins at the moment and I need to be able to get all the data out in a single query.
Sanitised version of the query is attached

Jason D.
100% (68)Projects Completed
115
Freelancers worked with
99
Projects awarded
33%
Last project
26 Mar 2025
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies