Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...
|
pg_fetch_array: msg#00050
Hello....
I would like to know the performance of pg_fetch_array. Cosider the code:
$query = "select * from foo";
$result = pg_query( $db, $query );
while ($row = pg_fetch_array($result))
{
$a = $row["a"];
$b = $row["b"];
$c = $row["c"];
$d = $row["d"];
}
Does php need to read database everytime when pg_fetch_array is executed in
the while loop or all the rows have been in the memory after pg_query?
If read database is needed, is there any method to copy all the things into
memory by using other command? (because I have a application which needs
large amount database update/retrieval and I wish the performance of the
overall applications run faster.)
or other method you would like to recommend in order to make the faster
response time?
Thank you in advance.
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
|
| |