由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - How did they track the article status in this BBS?
相关主题
Any faster way to retrieve only one record?How to handle inserting value to Identity column in sql server 2005
求助:将multiple checkbox改为一个column多个redord写入数据库请问如何实现这样一个mysql的query, 谢谢
Table Merge (SQL Server)%如何把一个table所有的column都选出来%
其实有个问题好久没有明白!SQL aggregate multiple columns in ACCESS
a simple question about insert用SSIS EXPORT 到 EXCEL 2010 有2000个COLUMN,可能吗
Oracle Group and Index questionmacro 请教,谢谢
better way to compare nullable columns?这个sql语句怎么写
问个external table field definition的问题SQL combine two columns from two different tables no shared (转载)
相关话题的讨论汇总
话题: articles话题: status话题: bbs话题: unread话题: article
进入Database版参与讨论
1 (共1页)
C****n
发帖数: 2324
1
I mean the READ/NOREAD status.
The system remember the read/noread status for every user/every articles, I
just feel it's kindof impossible.
I guess we have 2000 users. Let's say we have up to 100 discussion board, and
there're up to 10,000 articles in every board. (Actually, shopping board
already has more than 9,000 articles). If we use a table like UserID/ArticleID
to track the status, it just seems amazing to me, because there's gonna be
about 2000 X 10000 X 100 = 2,000,000,000 records in th
b****e
发帖数: 1275
2
i don't think tehy need to use userid/articleID. if you know how newsgroups
tracks what articles you read, it's only one row per userid/board. all the
unread articles separated by commas form the one column of unread_articles

【在 C****n 的大作中提到】
: I mean the READ/NOREAD status.
: The system remember the read/noread status for every user/every articles, I
: just feel it's kindof impossible.
: I guess we have 2000 users. Let's say we have up to 100 discussion board, and
: there're up to 10,000 articles in every board. (Actually, shopping board
: already has more than 9,000 articles). If we use a table like UserID/ArticleID
: to track the status, it just seems amazing to me, because there's gonna be
: about 2000 X 10000 X 100 = 2,000,000,000 records in th

C****n
发帖数: 2324
3
Sounds good, but there're more than 9000 articles in Shopping board.
So the column will in size of 9000X4 = 36k, maybe we'll have to make it 50k.
Is this too big?
But it's a good solution then, I am wondering the speed to join the article
table with the this status table.
Thanks,

I
and
UserID/ArticleID

【在 b****e 的大作中提到】
: i don't think tehy need to use userid/articleID. if you know how newsgroups
: tracks what articles you read, it's only one row per userid/board. all the
: unread articles separated by commas form the one column of unread_articles

b****e
发帖数: 1275
4
no, they can use 34-50,52,60-75

【在 C****n 的大作中提到】
: Sounds good, but there're more than 9000 articles in Shopping board.
: So the column will in size of 9000X4 = 36k, maybe we'll have to make it 50k.
: Is this too big?
: But it's a good solution then, I am wondering the speed to join the article
: table with the this status table.
: Thanks,
:
: I
: and
: UserID/ArticleID

C****n
发帖数: 2324
5

What does this mean?
And if a column is too big, it has to be in text mode, and text can't be used
to compare using "like something%...'.
Thanks,
Calvin
50k.
article
newsgroups
the
unread_articles

【在 b****e 的大作中提到】
: no, they can use 34-50,52,60-75
a*****a
发帖数: 438
6
but what if my unread articles are 3,6,9,...,3n? it'll taken even bigger
column because you need to say: 1-2,4-5,7-8... instead of 3,6,9.

【在 b****e 的大作中提到】
: no, they can use 34-50,52,60-75
b****e
发帖数: 1275
7
statistically this is a small-probability event. how many users leave
their boards with Ns scattered all over the place?
this, by the way, is also known as run-length encoding

【在 a*****a 的大作中提到】
: but what if my unread articles are 3,6,9,...,3n? it'll taken even bigger
: column because you need to say: 1-2,4-5,7-8... instead of 3,6,9.

a*****a
发帖数: 438
8
ok, that makes sense.
so i guess they store this read/unread information like this:
0xff, 0x00, 0xff, 0x1 (ie. 255 read, 255 unread)

【在 b****e 的大作中提到】
: statistically this is a small-probability event. how many users leave
: their boards with Ns scattered all over the place?
: this, by the way, is also known as run-length encoding

1 (共1页)
进入Database版参与讨论
相关主题
SQL combine two columns from two different tables no shared (转载)a simple question about insert
sql里怎么做循环?Oracle Group and Index question
mysql 一问better way to compare nullable columns?
Question about Oracle Driver问个external table field definition的问题
Any faster way to retrieve only one record?How to handle inserting value to Identity column in sql server 2005
求助:将multiple checkbox改为一个column多个redord写入数据库请问如何实现这样一个mysql的query, 谢谢
Table Merge (SQL Server)%如何把一个table所有的column都选出来%
其实有个问题好久没有明白!SQL aggregate multiple columns in ACCESS
相关话题的讨论汇总
话题: articles话题: status话题: bbs话题: unread话题: article