Posted by Jerry Stuckle on 10/05/06 13:49
..:[ ikciu ]:. wrote:
> Hmm Jerry Stuckle <jstucklex@attglobal.net> wrote:
>
>>Not a good idea to store what could be thousands of rows in the
>> session! A second query would be much better.
>
>
> idea is good but the problem is we don't know how how many rows contain this
> table. this is solution for small tables
>
>
Even then saving data in the session involves a fair amount of overhead
serializing the data, writing to disk, etc. Plus, the data is now
"stale" - it might have changed in the database.
Making another query is not a significant overhead for small tables, and
gets fresh data. It really doesn't take a lot before the MySQL query
becomes more efficient than saving data in the session.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|