Facebook - “IN”中的最大参数数量;条款?
在 Facebook 查询语言(FQL)
中,您可以指定 IN
子句,例如:
SELECT uid1, uid2 FROM friend WHERE uid1 IN (1000, 1001, 1002)
有谁知道您可以传递给 IN
的参数的最大数量是多少代码>?
In Facebook query language(FQL)
, you can specify an IN
clause, like:
SELECT uid1, uid2 FROM friend WHERE uid1 IN (1000, 1001, 1002)
Does anyone know what's the maximum number of parameters you can pass into IN
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为最大结果集大小是 5000
I think the maximum result set size is 5000
它可能看起来像一个奇数(所以也许我错过了计数,但它接近〜1),但我似乎无法查询超过 73 个
IN
项目。这是我的查询:这是使用 JavaSCript
FB.api()
调用。It may seem like an odd number (so perhaps I miss counted, but it's close ~1), but I can not seem to query more than 73
IN
items. This is my query:This is using the JavaSCript
FB.api()
call.不确定是否存在未记录的限制,或者可能是 facebook fql 服务器超时的问题。
您应该检查 FB Web 服务器是否返回错误 500,这可能表明您传递的 GET 语句太长(请参阅 Facebook 查询语言 - 长查询)
我意识到我的 get 太长了,所以我没有在 IN 语句中放入许多数字,而是在那里放置了一个子查询,从 FB FQL 中获取这些数字 - 但是不幸的是,FB 似乎无法处理该查询,并在 JSON 中返回了“未知错误”,这确实无助于我们理解问题。
Not sure if there is an undocumented limit or it might be an issue of facebook fql server timeout.
You should check if there is a error 500 returned from FB web server which might indicate you are passing a too long GET statement (see Facebook query language - long query)
I realized my get was too long so instead of putting many numbers in the IN statement, i put a sub-query there that fetches those numbers from FB FQL - but unfortunately it looks like FB couldn't handle the query and returned an 'unknown error' in the JSON which really doesn't help us understand the problem.
据我所知,不应该有最大参数数量,因为 SQL IN 中没有。
http://www.sql-tutorial.net/SQL-IN.asp
只是不要使用比要检查的函数值更多的参数,因为您不会得到任何结果(不知道它是否会给出错误,因为我从未尝试过)。
There shoud not be a maximum number of parameters as there isnt in SQL IN as far as I know.
http://www.sql-tutorial.net/SQL-IN.asp
just dont use more parameters than you have values for the function to check because you will not get any results (dont know if it will give away an error as I never tried to).