Hi all,

I am writing an object-oriented program in PHP, and some of the child
objects require similar data to their parents, but from different columns of
the same table.

Is it better to retrieve the whole table up-front and store it in a session
array, or to run the queries seperately each time the data is needed and
specify the column targets?

My first thought was to store it all in an array, but the problem is that
some of the data is CLOB data, and this is for a site that will have may
thousands of concurrent users, so I don't want to use up all the server's
memory by putting unnecessary things in arrays.

Another thought is that you could run the queries up-front and make the
query global, but only fetch rows as needed.

Any thoughts on this? The bottom line is that I am not sure whether it is
worse to run numerous smaller queries, or to run one large query and
possibly use more memory. Does running a query bring all the result data to
the client up-front anyway?

Thanks for any insights!

Regards,

Tyson Lloyd Thwaites
IT&e Limited
e-Commerce Division
Adelaide
(08) 8346 3888


Regards,

Tyson Lloyd Thwaites
IT&e Limited
e-Commerce Division
Adelaide
(08) 8346 3888


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to