Atitit. view the nature and principles of pre-compiled SQL question marks and view native SQL statements and atititsql
Atitit. view the nature and principles of pre-compiled SQL question marks and view native SQL statements
1. Pre-compilation principle. 1
2. preparedStatement has three advantages: 1
3. How to look gene SQL 2
1. Hb cfg all debug, cant see... 2
2. WSExplorer captures the pack according to the process.
3. Mysql 5.6 open log can be seen 2
4. Different implementations of Mysql and msssql 2
4. MYSql implements a full jdbc connection SQL, which can be easily viewed 2
. Mssql is implemented by thought sp... Only sp 2 can be seen
5. ambiguous option '-- log =/var/lib/mysql. log' (log-bin, log_slave_updates) 3
1. Pre-compilation principle.
SQL language Lin Ba Korean compilation changes to machine code... the SQL is 4gl, so the performance is slower, the efficiency of pre-compilation...
Each database tries its best to optimize the performance of precompiled statements. because pre-compiled statements may be called repeatedly. therefore, the Execution Code of statements compiled by the DB compiler is cached. Therefore, if the statements are the same pre-compiled statements in the next call, compilation is not required, you only need to pass the parameters directly into the compiled statement Execution Code (equivalent to a number of Han) and the code will be executed.
Author: old wow's paw Attilax iron, EMAIL: 1466519819@qq.com
Reprinted please indicate Source: http://blog.csdn.net/attilax
2. preparedStatement has three advantages:
I. code readability and maintainability.
2. PreparedStatement to maximize performance.
3. The most important thing is to greatly improve security.
3. How to look gene sql1. Hb cfg all debug, cant see...
Just question mark ..
2. WSExplorer can capture the pack according to the process ..
3. Mysql 5.6 open log can be seen
General_log = ON
General_log_file = c: \ mysql. log
Show variables like 'Log _ % '; view all log commands
4. different implementations of Mysql and msssql 4. the implementation of MYSql is that jdbc is fully connected to SQL, which can be easily viewed 5. 7. mssql is implemented by thought sp... only sp can be seen
5. ambiguous option '-- log =/var/lib/mysql. log' (log-bin, log_slave_updates)
2014-06-26 17:22:59 0 [ERROR] Aborting
After checking google, the solution is to discard the current log parameter.
General_log = ON
General_log_file =/tmp/mysql. log
Java pre-compilation problems, where SQL statements cannot be executed, and other inserts are normal.
Pstmt. setString (1, user. getId () + "");
Pstmt. setString (2, user. getName ());
Pstmt. setString (3, user. getPwd ());
This sets the SQL parameter value as a placeholder.
String SQL = "select id, name, pwd from userinfo where id = 10007 ";
No, so you can just delete these sentences. Or change:
String SQL = "select id, name, pwd from userinfo where id =? ";
Pstmt. setString (1, user. getId () + "");
View java pre-compiled SQL
No. The pre-compiled SQL statement has been changed. Class File