PHP.nl

pg_result_memory_size

pg_result_memory_size

Returns the amount of memory allocated for a query result

int **pg_result_memory_size** PgSql\Result $result

Returns the amount of memory, in bytes, allocated to the specified query result instance. This value is the same amount that would be freed by . PgSql\Result``pg_free_result

resultReturns the memory amount in bytes.

Voorbeeld: example

<?php
$db = pg_connect("dbname=users user=me");

$res = pg_query($db, 'SELECT 1');

$size = pg_result_memory_size($res);

var_dump($size);
?>
int(3288)

pg_free_result