获取用户最新 20 位好友签到的最快方法?

发布于 2024-12-23 11:03:34 字数 512 浏览 4 评论 0原文

我想获取当前用户 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

秉烛思 2024-12-30 11:03:34

节省的时间有多大?如果足够大,你可以进行增量搜索吗?

How big is the time saving? If big enough, you could do incremental search?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文