EXP Computer ThinConnect4 Podręcznik Użytkownika Strona 135: SQL Statement Cache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
Example
•
•
Set the sqlcache property of the Properties passed to the
DriverManager.getConnection method:
Properties info = new Properties();
info.put("user", user);
info.put("password", pw);
info.put("sqlcache", 100);
conn = DriverManager.getConnection (connStr, info);
Append
@sqlcache
to the database specification part of the connect URL:
Connection conn = DriverManager.getConnection(
jdbc:rdbthin://bravo:1701/my_db_dir:personnel@sqlcache=100,user,
pass);
In addition a SET SQLCACHE statement can be executed.
Stmt.executeUpdate(set sqlcache 100);
The value specified with the sqlcache switch tells the thin driver how many SQL statements
it can hold concurrently in its cache. A value of 0 (the default) specifies that SQL statement
caching be disabled.
Once the SQL statement cache is full for a given connection, the storing of a new statement
will remove the least commonly used statement from the cache.
Because SQL statements may be held in cache even after the user has closed the containing
java.sql.Statement, the query will still be registered as current by Oracle Rdb and may
prevent actions such as DROP TABLE from being done. In addition each concurrent
statement that is held in cache may take up memory on both the server and client side of the
connection.
You can clean out the connection SQL cache by issuing a SET SQLCACHE statement with
value 0 and then issuing another SET SQLCACHE statement to reset the cache to the desired
size.
Currently you cannot specify the removal of a specific SQL statement from cache.
Note:
SQL statement caching is a client-side action and is disabled by default. This feature is only
applicable to the thin driver. Using the SQL Statement cache property or using the set
sqlcache statement will be silently ignored by the native driver.
Contents
135
Plik PDF · ·
Pytania o EXP Computer ThinConnect4
Nie ma jeszcze pytań o tę instrukcję. Zadaj pierwsze.