PDO_OCI vs OCI8

I am working on a new project and trying to determine if I should use PDO_OCI or oci8 to connect to the database. Unfortunately, I don’t think anyone really compared them.

The information I have is the following so that you know why the choice is bothering me. OCI8 is developed by Oracle (AFAIK), so this seems to be a solid choice. I prefer PDO, but it doesn't look like the PDO_OCI extension has been updated for some time and it is still marked as experimental on the PHP docs page.

If someone can give me some thoughts about why you wouldn’t / use one or the other, so that I can go for it with a little deeper understanding of what is better, what would be great.

+7
source share
2 answers

I was very nervous about using PDO_OCI with an experimental record. However, I saw an important advantage of standardizing our database connections on PDOs throughout the corporation due to its data abstraction. I performed some tests to make sure that the data will go to the database and that it will be able to withstand the expected load. At this stage, he successfully processed about 15,000 records.

A note on php.net states that names and functions may change in a future version of PHP. I plan to test my implementation before we update to ensure that the functionality has not changed, but we will probably do it in any way.

I can say that it works well for us.

+8
source

I am copying the answer from this thread: Oracle, PDO_OCI vs OCI8

It seems to me that Oracle is not interested in developing a driver for PDO, which is developing its own driver to keep you closer to the oracle database ... to the oracle driver ... etc. :)

As far as I saw, there is no problem if you handle max. VARCHAR2 4000 CHARS texts. If you need CLOBs (and / or more), do not use PDO_OCI.

+1
source

All Articles