Re: pdo prepare()

From: Date: Fri, 30 Sep 2005 14:52:19 +0000
Subject: Re: pdo prepare()
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-3031@lists.php.net to get a copy of this message
On 9/30/05, Lukas Smith <lsmith@php.net> wrote: > I tried on mysql (against a version 5 server) and pgsql (against a > version 8 server). Both of them should use native prepared queries, or? They should. How do you "measure" that they're not preparing until later? > > PDO and its drivers don't necessarily know if prepare is to be > > emulated until you actually attempt to prepare. Why do you need to > > know? > > Well for example on mysql the backend server may or may not support it. > Like I said this opens up a bigger topic about how much runtime > introspection we support. This may be important to know in order to > better understand the performance implications of operations which in > turn might lead you to do things different. Maybe you just want to > collect the information. Hmm. I don't think those performance questions are the kind of thing that you can answer dynamically; if you care that much about performance, your app will usually avoid any kind of dynamic introspection. I don't mind adding a set of attributes for these things that you can query via getAttribute(), but as I said, we don't always know for sure how things are until we try them for the first time. --Wez.

« previous php.pecl.dev (#3031) next »