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.
Configuraţia la rulare
Comportamentul acestor funcţii este afectat de parametrii stabiliţi în php.ini.
| Name | Default | Changeable | Changelog |
|---|---|---|---|
| oci8.privileged_connect | "0" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
| oci8.max_persistent | "-1" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
| oci8.persistent_timeout | "-1" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
| oci8.ping_interval | "60" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
| oci8.statement_cache_size | "20" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
| oci8.default_prefetch | "10" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
| oci8.old_oci_close_semantics | "0" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
Iată o explicaţie pe scurt a directivelor de configurare.
- oci8.privileged_connect boolean
-
This option enables privileged connections using external credentials (OCI_SYSOPER, OCI_SYSDBA).
- oci8.max_persistent int
-
The maximum number of persistent OCI8 connections per process. Setting this option to -1 means that there is no limit.
- oci8.persistent_timeout int
-
The maximum length of time (in seconds) that a given process is allowed to maintain an idle persistent connection. Setting this option to -1 means that idle persistent connections will be maintained forever.
- oci8.ping_interval int
-
The length of time (in seconds) that must pass before issuing a ping during oci_pconnect(). When set to 0, persistent connections will be pinged every time they are reused. To disable pings completely, set this option to -1.
Notă: Disabling pings will cause oci_pconnect() calls to operate at the highest efficiency, but may cause PHP to not detect faulty connections, such as those caused by network partitions, or if the Oracle server has gone down since PHP connected, until later in the script. Consult the oci_pconnect() documentation for more information.
- oci8.statement_cache_size int
-
This option enables statement caching, and specifies how many statements to cache. To disable statement caching just set this option to 0.
Notă: A larger cache can result in improved performance, at the cost of increased memory usage.
- oci8.default_prefetch int
-
This option enables statement prefetching and sets the default number of rows that will be fetched automatically after statement execution.
Notă: A larger prefetch can result in improved performance, at the cost of increased memory usage.
- oci8.old_oci_close_semantics boolean
-
This option controls oci_close() behaviour. Enabling it means that oci_close() will do nothing; the connection will not be closed until the end of the script. This is for backward compatibility only. If you find that you need to enable this setting, you are strongly encouraged to remove the oci_close() calls from your application instead of enabling this option.
Configuraţia la rulare
28-Jul-2008 11:08
07-Jul-2008 07: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.
