30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Zend Server <strong>Reference</strong> Manual<br />

Possible Causes and Solutions:<br />

Queries to a DB (database) - long, elaborate and complicated DB queries may take a long time and<br />

make the function appear to take a long time to execute.<br />

There are many ways to speed up DB queries such as:<br />

422<br />

Revise the SQL query itself - make it simpler<br />

Improve the structure of your DB tables<br />

Use RDBMS features that can improve speed such as indexes, prepared statements, stored<br />

procedures etc…<br />

All these are only suggested possible causes and each event. Developers have to analyze each<br />

occurrence to understand the specific reasons behind the slow execution time.<br />

Long running actions - Some actions triggered by a function can, by definition take a long time.<br />

Examples of long running actions can be using a function to run code from the command line or remote<br />

access queries with Web services or searching for files in a directory. In most cases, these uses of a<br />

function cannot be refined and the best action is to ignore these issues when they occur.<br />

False Positives - Sometimes functions run slowly. Not all functions that run slowly are indicative of a<br />

problem in your code or environment and they may be no indication of unacceptable behavior. If this is<br />

the case, remove the function from the Rule’s “Watched Functions” list or set issues triggered by this<br />

function to ignored.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!