On 17/11/12 17:24, Rasmus Lerdorf wrote:
> Right, that is what I meant by focusing more on the carrot than the
> stick. Many people, yourself included, don't realize the things they
> would gain switching to mysqli. We need to do a better job with that and
> perhaps even consider if there are other things we can do in the
> extension to make it more attractive.
Indeed. And it is something to do very carefully. Otherwise, it just looks
like a "we vs them".


> There is a good summary page here:
>
> http://php.net/manual/en/mysqlinfo.api.choosing.php
>
> As you can see there is more to it than just prepared statements.
> Asynchronous queries, for example, is an extremely interesting feature.
It's interesting, but in most cases you will want the results
inmediatly. You
can only take advantage of that if you know in advance your query, and you
are doing anything else in the meantime. It has its uses, but that's not a
complete killer (and makes code harder to follow).
Also, it seems poorly documented, there is mysqli_reap_async_query listed
in php.net but not how to make one :(
A web search discovers a 2008 talk by Ulf, also points to
http://blog.ulf-wendel.de/?p=201 (a 404) but no explanation "this is how
you do it".
A very hacky approach using curl appears much higher :(
http://gonzalo123.com/2010/10/11/speed-up-php-scripts-with-asynchronous-database-queries/

> Being able to fire off your SQL query at the top of a page and then
> instead of waiting around for the result continue building the page
> until you get to the point where you need the DB result.
Do you really expend that much time building your html that it makes a
difference?


> And chances are
> that you will also eventually paint yourself into a corner with
> ext/mysql if you ever need transactions or some of the newer features in
> versions of MySQL beyond 5.1.
BEGIN and COMMIT work quite well :)
I don't know what mysql 5.1+ changes need client support.
Maybe the new ways of password hashing.


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to