# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 1
# self = https://watcher.sour.is/conv/jcc4s3q
分庫分表後,如何優雅的實現高效分頁查詢?**
分庫分表的一般做法---------一般會使用三種算法:哈希分庫分表: 根據分庫分表鍵算出一個哈希值,根據這個哈希值選擇一個數據庫。最常見的就是數字類型的字段作爲分庫分表鍵,然後取餘。比如在訂單表裏,可以按照買家的 ID 除以 8 的餘數進行分表範圍分庫分表: 將某個數據按照範圍大小進行分段。比如說根據 ID,[0,1000)在一張表,[1000,2000)在另外一張表。最常見的應該是按照日期進行 ⌘ Read more