Code optimization
Copy the Code code as follows:
for ($i =0; $i <8; $i + +) {
Array_push ($week, $arr);
}
Copy the Code code as follows:
for ($i =0; $i <8; $i + +) {
$week []= $arr [$i];
}
So there's no extra burden on the calling function.
The advantages and disadvantages of building an index
Benefit: The query will first go to the number of rows in the index list to target a specific value at a time, greatly reducing the number of rows to be traversed
Cons: In any case to query this table, field a large number of duplicate values, to increase the index does not make any sense
Record less, increase the index does not bring speed optimization instead of wasting storage space, because the index is required storage space, and a fatal disadvantage is that for each execution of Update|insert|delete, the index of the field must recalculate the update
The above describes the problem children are coming from the different World OVA PHP interview encountered problems in this record, including the problem children are from the different world OVA content, want to be interested in PHP tutorial friends helpful.