jeudi 15 mai 2014

MySql server configuration for maximum 60000 rows with excel file


Vote count:

0




I wrote a query which is fetching 60000 rows and creating excel file which should be available for download as excel file, but every time I am getting some errors like '500 internal server error' or 'mysql server has gone away'. But it works fine for lesser rows(10-15k) Here is mysql query:



SELECT C.*, T.Name AS TankName, T.*, P.*
FROM properties P
LEFT JOIN contacts C ON C.ID = P.ContactID AND C.CompanyID = $companyID
LEFT JOIN tanks T on T.PropertyID = P.ID $subQuery
WHERE P.CompanyID = $companyID
$condition
ORDER BY C.FullName = '', C.LastName, P.City, P.Address, P.ID


Do I need to optimize the query or change some sql configuration.



asked 54 secs ago






Aucun commentaire:

Enregistrer un commentaire