By using a prepared statement you avoid repeating the analyze/compile/optimize cycle.
通过使用预处理语句,可以避免重复分析/编译/优化周期。
When the query is prepared, the database will analyze, compile and optimize it's plan for executing the query.
当查询准备好后,数据库将分析、编译和优化执行该查询的计划。
A prepared statement allows you to take a commonly used SQL statement and pre-compile it, thereby dramatically improving performance if the statement is executed multiple times.
预备语句允许您用一条常用的sql语句然后预编译它,从而在这条语句被多次执行的情况下大幅度地提升性能。
应用推荐