We have an online shop that uses the salesrule table to store salesrules (discounts). A salesrule can be applied automatically or with a coupon code (salesrule_coupon). It can be assigned to one or more websites (core_website, relation table is salesrule_website).
This online shop uses the same database and tables for more than 20 websites we have (core_website).
The problem is that the query (attached) takes 3-10 seconds on the live server.
(4 million entries in salesrule_coupon and 1000 in salesrule table on the live server)
So this database should be optimized. My suggestion would be to check if there is any potential of adding indices.
Maybe we could also split the tables so we have one salesrule and salesrule_coupon table per website. The structure of the tables should not change for the administration, so we need still all salesrules in one table. Maybe we could create a trigger that would reflect any change of salesrule and salesrule_coupon in the websites table salesrule_website_1 and salesrule_coupon_website_1 etc.
If trigger is not possible maybe we could consider adding partitioning.","employmentType":["FULL_TIME","PART_TIME","CONTRACTOR","TEMPORARY","PER_DIEM"],"jobLocationType":"TELECOMMUTE","hiringOrganization":{"@type":"Organization","name":"Toogit","sameAs":"https://www.toogit.com/","logo":"https://www.toogit.com/images/toogit_logo_initial.png"},"identifier":{"@type":"PropertyValue","name":"Toogit","value":386182},"skills":["Database Administration","Database Programming","MySQL Programming","Performance Optimization","sql"],"applicantLocationRequirements":[{"@type":"Country","name":"IN"},{"@type":"Country","name":"Canada"},{"@type":"Country","name":"USA"},{"@type":"Country","name":"Germany"},{"@type":"Country","name":"Pakistan"},{"@type":"Country","name":"Philippines"},{"@type":"Country","name":"Indonesia"},{"@type":"Country","name":"Sri Lanka"},{"@type":"Country","name":"Nigeria"},{"@type":"Country","name":"China"},{"@type":"Country","name":"Russia"},{"@type":"Country","name":"Bangladesh"}],"validThrough":"2024-10-20T02:38:03+05:30","url":"https://www.toogit.com/freelance-jobs/Mzg2MTgy"}
Remote Network And System Administration Job In IT And Networking
Find more Network And System Administration remote jobs posted recently Worldwide
Work from Anywhere
40 hrs / weekHourly Type
Remote Job$19.13
Cost Looking for help? Checkout our video tutorial
How to search and apply for jobs
How to apply? Do you have more questions about the Job?
See frequently asked questions
i need to find the file where i can put my mysql database password.
i provide the files on the ftp once job award.
Hi there! Are you a SQL expert with experience in mobile gaming industry? Are you able to ask smart questions and get your answers from data? If yes, we would love to talk to you!
About us:
Megarama is one of the top employers on To...read more
Looking for someone that can convert my excel spreadsheet calculator into a good looking calculator that I can put on my website and my visitors can plug in their own numbers.
Writing a program that works with QuickBooks and many of my workers can access it on the same time to enter information, many reports to be created
IMPLEMENTATION OF AN ONLINE BUSINESS REGISTRATION AND LICENSING SYSTEM FOR THE MINISTRY OF TRADE