pg_fetch_array

Поиск
Список
Период
Сортировка
От Thanks
Тема pg_fetch_array
Дата
Msg-id cajq71$2vku$1@news.hub.org
обсуждение исходный текст
Ответы Re: pg_fetch_array  (Rod Taylor <pg@rbt.ca>)
Re: pg_fetch_array  (Richard Huxton <dev@archonet.com>)
Список pgsql-performance
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 rows 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.



В списке pgsql-performance по дате отправления:

Предыдущее
От: Stan Bielski
Дата:
Сообщение: Indexing question
Следующее
От: "Aaron"
Дата:
Сообщение: Re: 50 000 000 Table entries and I have to do a keyword search HELP NEEDED