Slow reporting

2

Well I'm having some bottlenecks in my application and I'm not identifying the problem. I will try to explain as much as possible what happens and the configuration I use.

Server Settings

I use a Jelastic server with 2 environments. One running php 5.6 and the other running mysql 5.6.24. With this I have separate environments, improving the performance since each server has its own processor and memory.

Site Settings

The php performs a simple query query, however the user has many records, which can reach the 20,000 records per report. This report soon takes some time to complete but no problem.

Problem description

When a user generates the report it takes an average of 1 to 3 minutes to complete due to a large amount of data, but the whole system is slow, even for other people who are not on the same network. The entire server is slow to respond and the situation normalizes only after the process of generating the report is finished. Jelastic provides graphics to keep pace with memory and processor consumption. I follow them but the load does not even come half of what I have configured in my environment, ie it does not seem to be a problem of low memory or processor. Has algae thing I'm forgetting to set up or check? Is it possible to make the system control the resources for each connection (user) so that it does not happen anymore?

-------------------- Edit ----------------

Well to get easier I'll post the form I'm putting together the report. The problem occurs in the backend when I'm mounting the array.

1 º I have 3 tables, they are: cadastro , f_pagamento and pedidos .

2nd I set the array like this:

// Query in DB     $ query = $ connection-> query ("         select             *         from             requests         Onde             date > = '01 -07-2017 '             and data

asked by anonymous 26.07.2017 / 19:29

0 answers