RE: [PHP] Can PHP do this?
| From: | Sander Pilon | Date: | Tue, 09 Jan 2001 21:46:49 +0000 |
| Subject: | RE: [PHP] Can PHP do this? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33556@lists.php.net to get a copy of this message | ||
First, you dont store this forever. You store only the results for the last
<X> messages.
Second, you use ranges. Per SQL-Row have the possibility to set values for a
whole range of articles.
This would be an all-int table. Very fast and very small if properly
indexed.
(Something like 10 to 20 bytes per entry, times a million rows is still only
20Mb)
And you store only something if the user read it, so that would be ( #read
articles where article in last <X> articles per user).
Last, you could cache some of the results in RAM. (I'm doing something like
that now, although I dont use PHP for this particular project.)
>
> At 01:42 PM 1/9/2001 +0100, Sander Pilon wrote:
> >Per user, just store in a table which messages he read or not.
>
> Wouldn't that turn into a huge bloated (slow) table of 10,000 some odd
> messages times however many users you have?
>
> -Ed
>