castiel8 Posted March 25, 2010 Share Posted March 25, 2010 Hi.. Good day.. im not quite sure if the title suits my problem. well anyways, here's my problem. im currently doing a system using PHP/MySQL. everything went well, not until the generation of report comes. i would introduce first the function of the system. im doing a time keeping for my company. the employee would list the number of working hours rendered for a specific client in a day. and after a month the manager would generate a report regarding on the said matter. now, im currently using the PEAR Excel Spreadsheet to generate the report in excel format. but i think my problem doesnt lie here. every time the manager generates the report, i takes about 20secs before it produces an output, and the process to generate the report goes something like this: 1. queries the database all the records under the specified month. (i tell you that approximately 3,000 rows are being sent back) 2. after gathering the rows, the hours are then being totaled, each hours are totaled and segregated by clients. 3. what complicates it more is that each client has a specific job code, and the hours are being divided by the specified job code 4. empty rows and other undesired data are being filtered. anyways here's a sample format of what i saying: Client Name Job Code Working Hours Company A Accounting 25 Company A Payroll 10 Company B Accounting 46 Company C Payroll 19 etc... now is it really natural that it would take PHP 20 secs to generate that kind of report? and why is it that whenever the manager generates a report, the system kinda like freezes and all other connections/transactions/queries from other employees also take the same amount of time before it completed (it also freezes), where naturally it would only take 0.002 secs without the manager generating the report at the same time (like for example, a user logging in to the system). Thank you very much in advance. Link to comment https://forums.phpfreaks.com/topic/196468-php-freezes/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.