Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85941 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38542 invoked from network); 24 Apr 2015 08:20:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2015 08:20:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:37994] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/50-36715-DCCF9355 for ; Fri, 24 Apr 2015 04:20:29 -0400 Received: (qmail 25803 invoked by uid 89); 24 Apr 2015 08:13:45 -0000 Received: by simscan 1.3.1 ppid: 25797, pid: 25800, t: 0.0917s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 24 Apr 2015 08:13:45 -0000 Message-ID: <5539FB39.2020306@lsces.co.uk> Date: Fri, 24 Apr 2015 09:13:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <5537826A.9010209@gmx.de> <5538881C.8010502@oracle.com> <5538C2A7.4050600@lsces.co.uk> <5538CF4B.5090401@beccati.com> <5538D9B0.5020507@lsces.co.uk> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: PDO Oracle driver From: lester@lsces.co.uk (Lester Caine) On 24/04/15 07:16, Arvids Godjuks wrote: > 2015-04-24 4:42 GMT+03:00 Benjamin Eberlei : > >> On Thu, Apr 23, 2015 at 3:45 PM, Arvids Godjuks >> wrote: >> >>> PDO is everywhere. Doctrine? Based on PDO. >> >> >> You can use mysqli, oci8 or sqlsrv for example without problems in >> Doctrine. >> >> Exposing some of the internal api of PDO as php functions (SQL Parser) I >> would bet it is possible to reimplement PDO in PHP code using mysqli etc.. >> as "drivers". >> >> I think we could discuss going that road as well and we could save >> ourselves maintaining some thousands of lines of C code. > > May I question the sanity of the words written in this email? :D (it's a > joke). > > The whole point of mysqlnd drivers and other improvements was to cut down > on data copying, improving performance and doing a lot of other stuff. > Moving PDO to a PHP implementation will kill it all: preformance will > suffer, memory usage will skyrocket, dealing with charsets - I don't even > wana pretend I understand how to deal with that part in a proper fasion. > Doesn't it require access to internal PHP api's to do a lot of what PDO and > other native drivers do? > Well, the Zephyr could pitch in here, MAYBE, depending on how good it > actually is and what it can do, but still, it feels more like a cruch to me. Via ADOdb I can use either the PDO or the generic driver. It's actually how I've been testing pdo_firebird simply by switching the underlying interface. Much of what PDO is doing is actually no different to the generic driver as at the end of the day you want an array of data from one location to another. My own concern has been that all this debate on 'type hints' actually messes up the simple array process where we just get an array of strings which PHP then uses appropriately. But the bottom line is perhaps that PDO's 'flattening' of data types can slow down the process if it introduces conversions which are not really necessary? In the case of ADOdb, the PDO driver is slower than the generic driver, which some will say is down to the overheads of ADOdb, but those overheads in many cases are only the same as any other SQL abstraction layer. The overall process is what matters, and if you don't need SQL abstraction, is there any advantage to PDO over the generic driver if you are only ever using one database? The theory was that having the same data layer would simplify software design, but it just introduces another layer of complication. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk