Re: Re: mysql and unbuffered queries

From: Date: Mon, 07 May 2001 10:07:14 +0000
Subject: Re: Re: mysql and unbuffered queries
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-54197@lists.php.net to get a copy of this message
Second question is: What is the use of mysql_query() function anymore then? Why not just exchange mysql_query() with mysql_unbuffered_query() ? You didn't say anything about any disadvantages on using it. :) --Jani On Mon, 7 May 2001, Zeev Suraski wrote: >It can be used pretty much anywhere mysql_query() can be used. >It's new, that's why it's not documented :) >The benefits of it: >- At no point does the client (PHP) have to hold the entire result set in >memory. With big query results, it can save a lot of RAM. >- Response time is generally better, especially with complex/large >queries. You get the first row as soon as it's available, instead of >having to wait for the MySQL server to find all of the rows. > >Zeev > >At 11:45 7/5/2001, Jani Taskinen wrote: >>On Mon, 7 May 2001, Zeev Suraski wrote: >> >> >At 02:16 7/5/2001, Wez Furlong wrote: >> >>I've seen "mysql_unbuffered_query" mentioned a couple of times >> >>lately and I >> >>thought that it would be useful for my current project. >> >>However, I need the functionality of mysql_db_query, but working in >> >>unbuffered mode. >> >>I was about to produce a patch and noticed that the proto comments already >> >>include an optional parameter that appears as if it were to be used for >> >>this purpose, although it is not yet handled by the code. >> >> >> >>Should I create a patch that enables the parameter? >> >> >> >>It's just a case of defining the constants and passing it to the >> >>"do_query_general" function, right? >> > >> >Probably... Are you sure you can't use mysql_unbuffered_query(), >> >though? If you're really used to supplying the database argument, you can >> >easily write a 2 line PHP function that does the same thing... >> > >> >>Hmm..this seems to be an undocumented function. What is the use of it? >>Benefits over using mysql_query() for example? Where/when it _can't_ be used? >> >>--Jani > >-- >Zeev Suraski <zeev@zend.com> >CTO & co-founder, Zend Technologies Ltd. >http://www.zend.com/ >

« previous php.dev (#54197) next »