获取用户最新 20 位好友签到的最快方法?
我想获取当前用户 20 个最新好友的签到信息。我执行了以下 FQL 查询,该查询有效,但速度非常慢(约 10 秒):
SELECT checkin_id
FROM checkin
WHERE author_uid in (SELECT uid2 FROM friend WHERE uid1=me())
ORDER BY timestamp DESC
LIMIT 0,20
我确实注意到,如果我放置时间过滤器,它会返回得更快,但它不能保证我能返回最后 20 次签到。
SELECT checkin_id
FROM checkin
WHERE timestamp > 1317252997
AND author_uid in (SELECT uid2 FROM friend WHERE uid1=me())
LIMIT 0,20
有谁对加快速度或更快的方法有任何建议吗?我应该查看流表吗?我也没有看到使用图形 api 获得此结果的明显方法。
提前致谢。
I'd like to get the current users 20 latest friend's checkins. I did the following FQL query which works, but is very slow (~10 seconds):
SELECT checkin_id
FROM checkin
WHERE author_uid in (SELECT uid2 FROM friend WHERE uid1=me())
ORDER BY timestamp DESC
LIMIT 0,20
I did notice that if I put a time filter it comes back much faster, but it won't guarantee I get back the last 20 checkins.
SELECT checkin_id
FROM checkin
WHERE timestamp > 1317252997
AND author_uid in (SELECT uid2 FROM friend WHERE uid1=me())
LIMIT 0,20
Does anyone have any advice on speeding this up or a faster way to do this? Should I be looking at the stream table perhaps? I also didn't see an obvious way to get this with the graph api.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
节省的时间有多大?如果足够大,你可以进行增量搜索吗?
How big is the time saving? If big enough, you could do incremental search?