|
1 | 1 | <!--
|
2 |
| -$PostgreSQL: pgsql/doc/src/sgml/ref/prepare.sgml,v 1.9 2003/12/01 22:07:58 momjian Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/ref/prepare.sgml,v 1.10 2003/12/14 00:55:46 neilc Exp $ |
3 | 3 | PostgreSQL documentation
|
4 | 4 | -->
|
5 | 5 |
|
@@ -52,7 +52,7 @@ PREPARE <replaceable class="PARAMETER">plan_name</replaceable> [ (<replaceable c
|
52 | 52 | </para>
|
53 | 53 |
|
54 | 54 | <para>
|
55 |
| - Prepared statements are only for the duration of the current |
| 55 | + Prepared statements only last for the duration of the current |
56 | 56 | database session. When the session ends, the prepared statement is
|
57 | 57 | forgotten, so it must be recreated before being used again. This
|
58 | 58 | also means that a single prepared statement cannot be used by
|
@@ -115,12 +115,12 @@ PREPARE <replaceable class="PARAMETER">plan_name</replaceable> [ (<replaceable c
|
115 | 115 | <title>Notes</title>
|
116 | 116 |
|
117 | 117 | <para>
|
118 |
| - In some situations, the query plan produced by for a prepared |
119 |
| - statement may be inferior to the plan produced if the statement |
120 |
| - were submitted and executed normally. This is because when the |
121 |
| - statement is planned and the planner attempts to determine the |
122 |
| - optimal query plan, the actual values of any parameters specified |
123 |
| - in the statement are |
| 118 | + In some situations, the query plan produced for a prepared |
| 119 | + statement will be inferior to the query plan that would have been |
| 120 | + chosen if the statement had been submitted and executed |
| 121 | + normally. This is because when the statement is planned and the |
| 122 | + planner attempts to determine the optimal query plan, the actual |
| 123 | + values of any parameters specified in the statement are |
124 | 124 | unavailable. <productname>PostgreSQL</productname> collects
|
125 | 125 | statistics on the distribution of data in the table, and can use
|
126 | 126 | constant values in a statement to make guesses about the likely
|
|
0 commit comments