NYCPHP Meetup

NYPHP.org

[nycphp-talk] slow php

Daniel Convissor danielc at analysisandsolutions.com
Fri Feb 13 17:11:33 EST 2009


Hi Nicholas:

Here are two additional options to consider, both revolving around the 
concept of getting the database to do the work.

First, many people write scripts to read, modify and then write the data 
back to the database because they are unfamilliar with the INSERT SELECT 
and UPDATE SELECT syntaxes.  These syntaxes are very powerful.

Second, if you have very complex, interdependent operations to do that 
can't be done via queries, turn it into a stored procedure inside MySQL.

Oh, and a third possiblity is to combine the two.  Write some functions 
that you can then use in the queries.

All that aside, you could be having issues with transaction buffers 
getting huge or slow query logging bogging things down.  Are you using 
transactions at all?

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list