3, in the cycle of judgment, the value of the use of identity is equal to the efficient
$a =2; $b = 2;
like
.
if ($a = = $b) $c = $a;
than
if ($a = = = $b) $c = $a;
Efficient
Use where in less limit when
4,mysql queries
limit check many records of the first few, fast, but the most of the query will be slow
use in. On query continuity records, very fast, discontinuous records first run will be slightly slower, but later will be faster!
5,nt Server data operation stability is less than unix/linux
6, use Ob_start () as far as possible before using the output; Can speed up output speed, suitable for NT or Nuli/linux, Unlix Class Server if Use Ob_start (' Ob_gzhandler '), output efficiency will be higher
7, as far as possible use if ($a = = his value) to use if (empty ($a) when the negation, because the program runs faster
8,!= and <> efficiency are quite
when used unequally
9, personal experience to use $a = "11111111111111"; The efficiency and $a = ' 11111111111111 '; Quite. Not as much as the book says.
10, using the canonical SQL statement, will benefit the MySQL parsing
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service