|
|
|
Как отключить reuse of prepared statements
|
|||
|---|---|---|---|
|
#18+
дока JDBCReuse of prepared statements--PreparedStatements can be used with different pooled connections. This is an important performance improvement for middle tier applications. Подскажите, как отключить эту фичу? Код: plaintext Код: plaintext 1. 2. Проблема, собственно, в том, что два юзера каждый в своем коннекшене делают prepareStatement() с одинаковым SQL-запросом и получают один и тот же экземпляр PreparedStatement, что не есть гуд. Oracle JDBC Driver version - 10.1.0.2.0 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.04.2007, 19:09:33 |
|
||
|
Как отключить reuse of prepared statements
|
|||
|---|---|---|---|
|
#18+
А если так? JDBC Developer’s Guide and ReferencePlain statements are not implicitly cached, because implicit statement caching uses a SQL string as a key, and plain statements are created without a SQL string. Therefore, implicit statement caching applies only to the OraclePreparedStatement and OracleCallableStatement objects, which are created with a SQL string. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.04.2007, 22:49:34 |
|
||
|
Как отключить reuse of prepared statements
|
|||
|---|---|---|---|
|
#18+
Проблема решилась с помощью Код: plaintext ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.04.2007, 17:12:18 |
|
||
|
Как отключить reuse of prepared statements
|
|||
|---|---|---|---|
|
#18+
LennierПроблема, собственно, в том, что два юзера каждый в своем коннекшене делают prepareStatement() с одинаковым SQL-запросом и получают один и тот же экземпляр PreparedStatement, что не есть гуд. Есть готовый тест кейс? это ж явный баг. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.04.2007, 10:20:11 |
|
||
|
Как отключить reuse of prepared statements
|
|||
|---|---|---|---|
|
#18+
Насколько я понял, кэширование стейтментов это не баг, а фича JDBC 3.0. По крайней мере, преподносится как фича. Тест-кейз лениво выдирать, кто захочет протестить - написать не сложно. Берутся 2 соединения, в каждом делается prepareStatement(String sql) и проверяется, что вернулся один и тот же экземпляр стейтмента. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.04.2007, 10:47:30 |
|
||
|
Как отключить reuse of prepared statements
|
|||
|---|---|---|---|
|
#18+
фича причём очень даже замечательная? нужно только помнить что JDBC Developer’s Guide and Referenceexplicit statement caching retains statement data and state as well as metadata для implicit statement caching JDBC Developer’s Guide and Reference state and data information are automatically re-initialized and reset to default values, while metadata is saved. The Least Recently Used (LRU) scheme performs the statement cache operation. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.04.2007, 13:00:37 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=34438685&tid=2146140]: |
0ms |
get settings: |
20ms |
get forum list: |
31ms |
check forum access: |
8ms |
check topic access: |
8ms |
track hit: |
55ms |
get topic data: |
23ms |
get forum data: |
4ms |
get page messages: |
88ms |
get tp. blocked users: |
2ms |
| others: | 292ms |
| total: | 531ms |

| 0 / 0 |
