How to configure Mysql for multiple connections?

Asked

Viewed 78 times

0

Hello, I have a client with 3 points of sale, 1 office and 1 server. Such a server is Mysql. When a certain export routine is performed in the office, a query is executed that takes a while to execute. With this the 3 points of sales end the system frozen because the server is running a certain query. It is possible to configure Mysql for multiple ? queries to avoid this problem when running such a routine.

1 answer

1


Mysql like other services (SQL Server, Oracle, etc.), as you just explained in your description, allows multiple queries. That is, the database engine receives the connections with the orders and these are processed in queue, in order of arrival, including the longest. There is a way to improve, you can analyze here techniques that exist, but we’ll get to that. Let’s separate the problem into parts, you want to be able to run high-CPU, RAM and time-consuming routines when the retail outlets are using? If yes, you need to review the server hosting the Mysql engine (+RAM, +CPU, +Disk-SSD), but before that, you need to review queries to be optimized, sometimes a poorly done query increases the execution time from a query to hours, when it should take seconds. Another alternative would be to review your architecture, and the heavy queries should be performed during a period that does not affect sales and this data should be stored in a separate data store from the operational database, you can still partition your data. In short, there are many ways to solve your problem, but only with more details about the whole architecture, you get more concrete help.

  • Thanks for the feedback. I had already found the problem. There really was a Query here that was taking 7 minutes. I checked that there was no index created and after creating them the query took no more than 2 seconds. Thanks for your attention.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.