Fabien Ménager
Fabien Ménager

Reputation: 140195

PHP Oracle 10g very slow fetch

I'm not used to use Oracle, so I may not ask my question really well.

I execute very simple SELECT queries from an Linux Apache server with PHP 5.3 (PECL Oci8 1.4.6, client 11.2.0.3.0) to an Oracle server (10g Enterprise Edition Release 10.2.0.1.0), which I'm not the admin of.

The oci_parse and oci_execute take less than a millisecond, but the oci_fetch_arrays that I do right after this are REALLY slow (sometimes more than a second).

At first, I tried changing the SELECT * by SELECT [all the columns I need], but it's still slow.

What should I look to ?

Upvotes: 3

Views: 3866

Answers (1)

Narf
Narf

Reputation: 14752

Try this:

oci_set_prefetch($statement_id, 1000);

... or increase your oci8.default_prefetch value in php.ini.

Upvotes: 3

Related Questions