Big than 4G datafile can user Myisam merge table.
// query cache does NOT work
$r = mysql_query("SELECT username FROM user WHERE signup_date >= CURDATE()");
// query cache works!
$today = date("Y-m-d");
$r = mysql_query("SELECT username FROM user WHERE signup_date >= '$today'");
t is a good habit to always specify which columns you need when you are doing your SELECT’s.
Vertical Partitioning is the act of splitting your table structure in a vertical manner for optimization reasons.
Example 1: You might have a users table that contains home addresses, that do not get read often. You can choose to split your table and store the address info on a separate table. This way your main users table will shrink in size. As you know, smaller tables perform faster.
Example 2: You have a “last_login” field in your table. It updates every time a user logs in to the website. But every update on a table causes the query cache for that table to be flushed. You can put that field into another table to keep updates to your users table to a minimum.
But you also need to make sure you don’t constantly need to join these 2 tables after the partitioning or you might actually suffer performance decline.
If you have some kind of maintenance script that needs to delete large numbers of rows, just use the LIMIT clause to do it in smaller batches to avoid this congestion.
f you do not need the time component, use DATE instead of DATETIME.
refer :
http://blog.tuvinh.com/top-20-mysql-best-practices/
PreparedStatements are implemented by the driver, as MySQL
does not have a prepared statement feature. Because of this,
the driver does not implement
getParameterMetaData()
or
getMetaData()
as it would require the
driver to have a complete SQL parser in the client.
Starting with version 3.1.0 MySQL Connector/J, server-side prepared statements and binary-encoded result sets are used when the server supports them.
This "Quick Start Guide" gives you some quick tips for troubleshooting. The subsections list some typical functions that can help you in troubleshooting, including one or more ways to get the information or perform the action.
These tips are organized as follows:
Hung, Deadlocked, or Looping Process
Post-mortem Diagnostics, Memory Leaks
Monitoring
Actions on a Remote Debug Server
Other Functions
Note: The vmID argument for the jstat command is the virtual machine identifier. See the jstat man page for a detailed explanation.
First, attach the debug daemon jsadebugd, then execute the command:
CREATE TABLE ProjectPaths(3. 用 hibernate 時,如果 stack over flow,考慮用 stack 代替recursive algrithm
VertexId INTEGER,
Depth INTEGER,
Path VARCHAR(300) 。
)
public void traverseDepthFirst( AST ast )
{
// Root AST node cannot be null or
// traversal of its subtree is impossible.
if ( ast == null )
{
throw new IllegalArgumentException(
"node to traverse cannot be null!" );
}
// Map to hold parents of each
// AST node. Unfortunately the AST
// interface does not provide a method
// for finding the parent of a node, so
// we use the Map to save them.
Map parentNodes = new HashMap();
// Start tree traversal with first child
// of the specified root AST node.
AST currentNode = ast.getFirstChild();
// Remember parent of first child.
parentNodes.put( currentNode , ast );
// Iterate through nodes, simulating
// recursive tree traversal, and add them
// to queue in proper order for later
// linear traversal. This "flattens" the
// into a linear list of nodes which can
// be visited non-recursively.
while ( currentNode != null )
{
// Visit the current node.
strategy.visit( currentNode );
// Move down to current node's first child
// if it exists.
AST childNode = currentNode.getFirstChild();
// If the child is not null, make it
// the current node.
if ( childNode != null )
{
// Remember parent of the child.
parentNodes.put( childNode , currentNode );
// Make child the current node.
currentNode = childNode;
continue;
}
while ( currentNode != null )
{
// Move to next sibling if any.
AST siblingNode = currentNode.getNextSibling();
if ( siblingNode != null )
{
// Get current node's parent.
// This is also the parent of the
// sibling node.
AST parentNode = (AST)parentNodes.get( currentNode );
// Remember parent of sibling.
parentNodes.put( siblingNode , parentNode );
// Make sibling the current node.
currentNode = siblingNode;
break;
}
// Move up to parent if no sibling.
// If parent is root node, we're done.
currentNode = (AST)parentNodes.get( currentNode );
if ( currentNode.equals( ast ) )
{
currentNode = null;
}
}
}
<jsp-property-group>
<deferred-syntax-allowed-as-literal>
true
</deferred-syntax-allowed-as-literal>
</jsp-property-group>
或者在頁面中<%@page language="java" deferredSyntaxAllowedAsLiteral="true" %>
> <jsp-config>
辦法3 :不用 jsp2.1 el
> <jsp-property-group>
> <url-pattern>*.jsp</url-pattern>
> <el-ignored>true</el-ignored>
> </jsp-property-group>
> </jsp-config>
http://www.mail-archive.com/dev@struts.apache.org/msg28920.html
我現(xiàn)在的疑問
在一個頁面中采用兩個 el 引擎,是否會對性能造成一定影響?
較小。
ProxyRequests Off
<Proxy *>
Order
deny,allow
Allow from all
</Proxy>