How large is the mysql_query() buffer?
How large is the mysql_query() buffer?
am 03.01.2008 15:37:51 von howa
For example,
$query = "SELECT ...'";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res)) {
// Do sth
}
If the query return say over 1M row, is it limited by the MySQL server
or PHP ?
Re: How large is the mysql_query() buffer?
am 03.01.2008 19:04:17 von Jerry Stuckle
howa wrote:
> For example,
>
> $query = "SELECT ...'";
> $res = mysql_query($query);
> while($row = mysql_fetch_assoc($res)) {
> // Do sth
> }
>
>
> If the query return say over 1M row, is it limited by the MySQL server
> or PHP ?
>
>
There is no hard limit in either. Rather, system resources would
probably be your limiting factor.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: How large is the mysql_query() buffer?
am 04.01.2008 04:53:25 von howa
On 1月4日, 上午2時04分, Jerry Stuckle wrote:
> howa wrote:
> > For example,
>
> > $query = "SELECT ...'";
> > $res = mysql_query($query);
> > while($row = mysql_fetch_assoc($res)) {
> > // Do sth
> > }
>
> > If the query return say over 1M row, is it limited by the MySQL server
> > or PHP ?
>
> There is no hard limit in either. Rather, system resources would
> probably be your limiting factor.
>
> --
For example, will mysql store all the 1M rows in a buffer, or it will
be fetched sequentially?
Re: How large is the mysql_query() buffer?
am 04.01.2008 05:08:10 von Jerry Stuckle
howa wrote:
> On 1月4日, 上午2時04分, Jerry Stuckle wrote:
>> howa wrote:
>>> For example,
>>> $query = "SELECT ...'";
>>> $res = mysql_query($query);
>>> while($row = mysql_fetch_assoc($res)) {
>>> // Do sth
>>> }
>>> If the query return say over 1M row, is it limited by the MySQL server
>>> or PHP ?
>> There is no hard limit in either. Rather, system resources would
>> probably be your limiting factor.
>>
>> --
>
> For example, will mysql store all the 1M rows in a buffer, or it will
> be fetched sequentially?
>
>
>
For MySQL specific information, try comp.databases.mysql.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: How large is the mysql_query() buffer?
am 04.01.2008 08:51:51 von Courtney
Jerry Stuckle wrote:
> howa wrote:
>> For example,
>>
>> $query = "SELECT ...'";
>> $res = mysql_query($query);
>> while($row = mysql_fetch_assoc($res)) {
>> // Do sth
>> }
>>
>>
>> If the query return say over 1M row, is it limited by the MySQL server
>> or PHP ?
>>
>>
>
> There is no hard limit in either. Rather, system resources would
> probably be your limiting factor.
>
Its set soemwhere in PHP.INI..there is a memory limit to what PHP will
use. 16Mbyte default IIRC. Mines at 64Mbyte and I managed to pull a
25Mbyte BLOB in and out of the database.
Re: How large is the mysql_query() buffer?
am 04.01.2008 08:52:28 von Courtney
howa wrote:
> On 1月4日, 上午2時04分, Jerry Stuckle wrote:
>> howa wrote:
>>> For example,
>>> $query = "SELECT ...'";
>>> $res = mysql_query($query);
>>> while($row = mysql_fetch_assoc($res)) {
>>> // Do sth
>>> }
>>> If the query return say over 1M row, is it limited by the MySQL server
>>> or PHP ?
>> There is no hard limit in either. Rather, system resources would
>> probably be your limiting factor.
>>
>> --
>
> For example, will mysql store all the 1M rows in a buffer, or it will
> be fetched sequentially?
>
>
Buffered.
Re: How large is the mysql_query() buffer?
am 04.01.2008 10:54:58 von luiheidsgoeroe
On Fri, 04 Jan 2008 08:52:28 +0100, The Natural Philosopher wrot=
e:
> howa wrote:
>> On 1=1B$B7n=1B(B4=1B$BF|=1B(B, =1B$B>e8a=1B(B2=1B$B;~=1B(B04=1B$BJ,=1B=
(B, Jerry Stuckle =
>> wrote:
>>> howa wrote:
>>>> For example,
>>>> $query =3D "SELECT ...'";
>>>> $res =3D mysql_query($query);
>>>> while($row =3D mysql_fetch_assoc($res)) {
>>>> // Do sth
>>>> }
>>>> If the query return say over 1M row, is it limited by the MySQL ser=
ver
>>>> or PHP ?
>>> There is no hard limit in either. Rather, system resources would
>>> probably be your limiting factor.
>>>
>>> --
>> For example, will mysql store all the 1M rows in a buffer, or it wil=
l
>> be fetched sequentially?
>>
> Buffered.
Normally, yes, and that's why we have something like =
mysql_unbuffered_query() :)
-- =
Rik Wasmus
Re: How large is the mysql_query() buffer?
am 04.01.2008 12:14:10 von Courtney
Rik Wasmus wrote:
> On Fri, 04 Jan 2008 08:52:28 +0100, The Natural Philosopher wrote:
>
>> howa wrote:
>>> On 1月4日, 上午2時04分, Jerry Stuckle
>>> wrote:
>>>> howa wrote:
>>>>> For example,
>>>>> $query = "SELECT ...'";
>>>>> $res = mysql_query($query);
>>>>> while($row = mysql_fetch_assoc($res)) {
>>>>> // Do sth
>>>>> }
>>>>> If the query return say over 1M row, is it limited by the MySQL server
>>>>> or PHP ?
>>>> There is no hard limit in either. Rather, system resources would
>>>> probably be your limiting factor.
>>>>
>>>> --
>>> For example, will mysql store all the 1M rows in a buffer, or it will
>>> be fetched sequentially?
>>>
>> Buffered.
>
> Normally, yes, and that's why we have something like
> mysql_unbuffered_query() :)
Do we? live and learn eh?
Re: How large is the mysql_query() buffer?
am 04.01.2008 14:14:39 von Jerry Stuckle
The Natural Philosopher wrote:
> howa wrote:
>> On 1月4日, 上午2時04分, Jerry Stuckle
>> wrote:
>>> howa wrote:
>>>> For example,
>>>> $query = "SELECT ...'";
>>>> $res = mysql_query($query);
>>>> while($row = mysql_fetch_assoc($res)) {
>>>> // Do sth
>>>> }
>>>> If the query return say over 1M row, is it limited by the MySQL server
>>>> or PHP ?
>>> There is no hard limit in either. Rather, system resources would
>>> probably be your limiting factor.
>>>
>>> --
>>
>> For example, will mysql store all the 1M rows in a buffer, or it will
>> be fetched sequentially?
>>
>>
> Buffered.
>
Not necessarily. It's why I recommended comp.databases. mysql - for a
CORRECT answer.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: How large is the mysql_query() buffer?
am 04.01.2008 14:15:28 von Jerry Stuckle
The Natural Philosopher wrote:
> Jerry Stuckle wrote:
>> howa wrote:
>>> For example,
>>>
>>> $query = "SELECT ...'";
>>> $res = mysql_query($query);
>>> while($row = mysql_fetch_assoc($res)) {
>>> // Do sth
>>> }
>>>
>>>
>>> If the query return say over 1M row, is it limited by the MySQL server
>>> or PHP ?
>>>
>>>
>>
>> There is no hard limit in either. Rather, system resources would
>> probably be your limiting factor.
>>
> Its set soemwhere in PHP.INI..there is a memory limit to what PHP will
> use. 16Mbyte default IIRC. Mines at 64Mbyte and I managed to pull a
> 25Mbyte BLOB in and out of the database.
>
>
>
Which has absolutely nothing to do with MySQL buffering.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================