f*********n 发帖数: 21 | 1 比如一个网页设计,like facebook image function, 有一个user upload一个image,
其他user可以comment,让设计table, 有user table, comment table;如果有一个
image 有millions of comments,如何设计可以在很短时间内load 这个image的comment
?是设计 一个image的table莫? | s******i 发帖数: 7 | | s******i 发帖数: 7 | 3 即使有很多的comment,也不会一下子就全部都展现到前端吧,感觉得问一下具体业务是
什么? | f*********n 发帖数: 21 | 4 面的一个web develop 的startup岗位。还没讨论到ui的设计,一直在问后端。。
你说的索引就是以image id as index to build a table and put all the comment
to this image id as a column?
多谢!
【在 s******i 的大作中提到】 : 即使有很多的comment,也不会一下子就全部都展现到前端吧,感觉得问一下具体业务是 : 什么?
| t*****3 发帖数: 112 | 5 抛砖先:分页处理后台数据,一次不需要load这么多comments。比如oracle的pl/sql就
可以直接做分页,一个表billions记录的查询在pc服务器上都是非常非常快的。如果自
己设计存储,比如一个image的所有comments在一个文件里,那么就得能够提供函数每
次读取文件的一部分。
comment
【在 f*********n 的大作中提到】 : 比如一个网页设计,like facebook image function, 有一个user upload一个image, : 其他user可以comment,让设计table, 有user table, comment table;如果有一个 : image 有millions of comments,如何设计可以在很短时间内load 这个image的comment : ?是设计 一个image的table莫?
|
|