473,800 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How large is the mysql_query() buffer?

For example,

$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($row = mysql_fetch_ass oc($res)) {
// Do sth
}
If the query return say over 1M row, is it limited by the MySQL server
or PHP ?

Jan 3 '08 #1
9 2541
howa wrote:
For example,

$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($row = mysql_fetch_ass oc($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.
js*******@attgl obal.net
=============== ===

Jan 3 '08 #2
On 1$B7n(B4$BF| (B, $B>e8a(B2$B; ~(B04$BJ,(B, Jerry Stuckle <jstuck...@attg lobal.netwrote:
howa wrote:
For example,
$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($row = mysql_fetch_ass oc($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?
Jan 4 '08 #3
howa wrote:
On 1$B7n(B4$BF| (B, $B>e8a(B2$B; ~(B04$BJ,(B, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>howa wrote:
>>For example,
$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($row = mysql_fetch_ass oc($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.
js*******@attgl obal.net
=============== ===

Jan 4 '08 #4
Jerry Stuckle wrote:
howa wrote:
>For example,

$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($row = mysql_fetch_ass oc($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.
Jan 4 '08 #5
howa wrote:
On 1$B7n(B4$BF| (B, $B>e8a(B2$B; ~(B04$BJ,(B, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>howa wrote:
>>For example,
$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($row = mysql_fetch_ass oc($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.
Jan 4 '08 #6
On Fri, 04 Jan 2008 08:52:28 +0100, The Natural Philosopher <a@b.cwrote:
howa wrote:
>On 1$B7n(B4$BF| (B, $B>e8a(B2$B; ~(B04$BJ,(B, Jerry Stuckle
<jstuck...@att global.netwrote :
>>howa wrote:
For example,
$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($row = mysql_fetch_ass oc($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_unbuffere d_query() :)
--
Rik Wasmus
Jan 4 '08 #7
Rik Wasmus wrote:
On Fri, 04 Jan 2008 08:52:28 +0100, The Natural Philosopher <a@b.cwrote:
>howa wrote:
>>On 1$B7n(B4$BF| (B, $B>e8a(B2$B; ~(B04$BJ,(B, Jerry Stuckle
<jstuck...@at tglobal.netwrot e:
howa wrote:
For example,
$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($ro w = mysql_fetch_ass oc($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_unbuffere d_query() :)

Do we? live and learn eh?
Jan 4 '08 #8
The Natural Philosopher wrote:
howa wrote:
>On 1$B7n(B4$BF| (B, $B>e8a(B2$B; ~(B04$BJ,(B, Jerry Stuckle
<jstuck...@att global.netwrote :
>>howa wrote:
For example,
$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($row = mysql_fetch_ass oc($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.
js*******@attgl obal.net
=============== ===

Jan 4 '08 #9
The Natural Philosopher wrote:
Jerry Stuckle wrote:
>howa wrote:
>>For example,

$query = "SELECT ...'";
$res = mysql_query($qu ery);
while($row = mysql_fetch_ass oc($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.
js*******@attgl obal.net
=============== ===

Jan 4 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
913
by: zhimin | last post by:
Hi, I'm writing a program to send large file(100m) through dotnet using TCPListener & TCPClient, I'm sending the file with a ask and response loop: 1. Client send a flag 1 to server indicate it has data send to server. 2. Client send the buffer block size. 3. Client send the actual buffer to the server. 4. Server send a flag 1 to client indicating that the buffer has been successfully receeived. 5. The next loop until all data of the...
1
4013
by: lwickland | last post by:
Summary: System.Net.ScatterGatherBuffers.MemoryChuck allocates inordinately large bytes when sending large post data. The following application consumes inordinate quantities of memory. My code does not explicitly allocate memory in a loop nor does it explicitly allocate large blocks of memory. Yet, the application’s memory footprint will grow as large as 370 MB. Rarely will it run to completion; usually, it throws an out of memory...
12
6193
by: Sharon | last post by:
I’m wrote a small DLL that used the FreeImage.DLL (that can be found at http://www.codeproject.com/bitmap/graphicsuite.asp). I also wrote a small console application in C++ (unmanaged) that uses the DLL above. Now the application, together with the above DLL’s is successfully loading a TIF image file (62992 x 113386 Pixels, Huffman RLE compression, 3200 x 3200 DPI resolution, binary colored (1 Bit Per Pixel), file on disk size 43.08...
2
4641
by: gauravkhanna | last post by:
Hi All I need some help for the below problem: Scenario We need to send large binary files (audio file of about 10 MB or so) from the client machine (.Net Windows based application, located outside the home network) to the Web Server and then retrieve the file back from the web server to the client.
5
2922
by: Chameleon | last post by:
I have a SQL Script with about 5000 SQL Commands. How can I send it to SQL Server at once? I see mysql_query() fails on first semicolon (;) who delimits the SQL Commands. Another question: I send to a MySQL server via fast Internet connection, about 500 INSERT
7
10829
by: =?Utf-8?B?TW9iaWxlTWFu?= | last post by:
Hello everyone: I am looking for everyone's thoughts on moving large amounts (actually, not very large, but large enough that I'm throwing exceptions using the default configurations). We're doing a proof-of-concept on WCF whereby we have a Windows form client and a Server. Our server is a middle-tier that interfaces with our SQL 05 database server.
3
9243
by: patrickdepinguin | last post by:
Hi, I need to write large quantities of data to a file in C. The data comes from statistics that are continuously gathered from a simulator, and in order to not slow the whole thing down I would obviously want the writes to go as fast and efficient as possible. Since I/O operations are rather slow, I was thinking that using a large buffer would be better than writing each data point every time. Each data point calls my function, at which...
17
9959
by: byte8bits | last post by:
How does C++ safely open and read very large files? For example, say I have 1GB of physical memory and I open a 4GB file and attempt to read it like so: #include <iostream> #include <fstream> #include <string> using namespace std; int main () {
1
2238
by: Lambda | last post by:
As I know, when I use ifstream and ofstream to read and write file, it will use a stream buffer internally. How large is the stream buffer? If I want to write a large file, need I define a stream buffer myself? In what situation, user-defined stream buffer is useful?
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10279
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2948
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.