Re: Database result set question

From: Date: Thu, 12 Apr 2001 03:49:39 +0000
Subject: Re: Database result set question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-48241@lists.php.net to get a copy of this message
Most PostgreSQL functions are wrapper functions for libpq. Reading documents about libpq will help. Answer to your question is, it does not read all data into memory. I think most DB doesn't do that also. Data will be buffered in PostgreSQL backend, size is depends on your configuration. I'm not sure if it buffers on client side. Regards, -- Yasuo Ohgaki "Morgan Curley" <mcurley@e4media.com> wrote in message news:4.3.2.7.2.20010411174202.03192070@e4media.com... > Just out of curiosity, can anyone explain the mechanics behind accessing a > database query result set. > ie > $result_id = pg_execute( 'select * from my_table' ); > > when I call loop through pg_fetch_row( $result_id, $rom_num ) or > pg_fetch_object( $result_id, $rom_num ) > has php read the entire result set into memory( say the result set has > 10,000 records ), cached a fixed number of records in memory or does it > simply have a record_set_pointer of some sort that tells the DB where to > fetch the next asked for record from. > > This is probably a DB engine setting but I am curious what the process is. > > Thanks, > Morgan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#48241) next »