The initial value of oci8.default_prefetch was changed from 10 to 100 in PHP 5.3. This will give a better out of the box experience for people who don't know about the option or about the oci_set_prefetch() function. The change should have zero or negligible impact, using a little more memory by default if queries return more then 10 rows of data. Like all tuning tools: change the value to meet your requirements.
実行時設定
php.ini の設定により動作が変化します。
| 名称 | デフォルト | 変更可否 | 変更履歴 |
|---|---|---|---|
| oci8.privileged_connect | "0" | PHP_INI_SYSTEM | PHP 5.1.2 以降で使用可能 |
| oci8.max_persistent | "-1" | PHP_INI_SYSTEM | PHP 5.1.2 以降で使用可能 |
| oci8.persistent_timeout | "-1" | PHP_INI_SYSTEM | PHP 5.1.2 以降で使用可能 |
| oci8.ping_interval | "60" | PHP_INI_SYSTEM | PHP 5.1.2 以降で使用可能 |
| oci8.statement_cache_size | "20" | PHP_INI_SYSTEM | PHP 5.1.2 以降で使用可能 |
| oci8.default_prefetch | "10" | PHP_INI_SYSTEM | PHP 5.1.2 以降で使用可能 |
| oci8.old_oci_close_semantics | "0" | PHP_INI_SYSTEM | PHP 5.1.2 以降で使用可能 |
以下に設定ディレクティブに関する 簡単な説明を示します。
- oci8.privileged_connect boolean
-
このオプションは外部の信用 (OCI_SYSOPER, OCI_SYSDBA) を利用して権限付きの接続を有効にします。
- oci8.max_persistent int
-
プロセスあたりの永続的な OCI8 接続の最大値を指定します。 このオプションを -1 に設定することは、制限なしを意味します。
- oci8.persistent_timeout int
-
与えられたプロセスがアイドル状態の永続的接続を維持する最大時間 (秒単位) を指定します。 このオプションを -1 に設定することは、 アイドル状態の永続的接続は永久に維持されることを意味します。
- oci8.ping_interval int
-
oci_pconnect() の間、ping を発行するまでに経過させる時間 (秒単位) を指定します。 0 に設定した場合、永続的接続は再利用される度に ping を発行します。 ping を完全に無効にするためには、このオプションを -1 に設定します。
注意: ping を無効にすることで oci_pconnect() は最高の効率で処理をコールしますが、ネットワークが分断された場合や PHP が接続した後に Oracle サーバがダウンし、 その後に実行されるスクリプト中において PHP が接続の失敗を検知しなくなります。 詳細な情報は oci_pconnect() を参照ください。
- oci8.statement_cache_size int
-
このオプションはステートメントキャッシュを有効にします。 また、キャッシュするステートメントの数を指定します。 ステートメントキャッシュを無効にする場合、このオプションを 0 に設定してください。
注意: より大きなキャッシュは、メモリ使用量の増加と引き替えに パフォーマンスの改善をもたらします。
- oci8.default_prefetch int
-
このオプションはステートメントのプリフェッチを有効にし、 ステートメントの実行後自動的にフェッチされるデフォルトの行数を 設定します。
注意: より大きなプリフェッチは、メモリ使用量の増加と引き替えに パフォーマンスの改善をもたらします。
- oci8.old_oci_close_semantics boolean
-
このオプションは oci_close() の動作を制御します。有効にすると、oci_close() は何も行いません。接続はスクリプトの終了まで閉じられません。 これは後方互換性のためのみに存在しています。 この設定を有効にする必要があると判明した場合、 このオプションを有効にする代わりに、 oci_close() をアプリケーションから削除することが 強く推奨されます。
実行時設定
28-Jul-2008 02:08
07-Jul-2008 10:47
PHP 5.3 introduces two new options.
oci8.events "Off" PHP_INI_SYSTEM Available since PHP 5.3
oci8.connection_class "" PHP_INI_ALL Available since PHP 5.3
1. oci8.connection_class String
This user defined text is used by Oracle 11g Database Resident
Connection Pooling (DRCP) connections to sub-partition to connection
pool. It allows connections from an application to reuse database
sessions, giving better scalability.
DRCP is available when OCI8 is linked with Oracle 11g libraries and
connected to Oracle Database 11g.
2. oci8.events Boolean
oci8.events allows PHP to be notified of database Fast Application
Notification (FAN) events.
Without FAN, when a database instance or machine node fails
unexpectedly, PHP applications may be blocked waiting for a database
response until a TCP timeout expires. With FAN events, PHP
applications are quickly notified of failures that affect their
established database connections. OCI8 will clean up unusable
connections in the persistent connection cache.
The database must be configured to post FAN events.
FAN support is available when OCI8 is linked with Oracle 10gR2 or
later libraries and connected to Oracle Database 10gR2 or later.
