3

我正在尝试为以公共子字符串开头的 url 检索 link_stats 的有序(降序)结果集。我正在尝试使用以下内容:

SELECT url,
       normalized_url,
       share_count,
       like_count,
       comment_count,
       total_count,
       commentsbox_count,
       comments_fbid,
       click_count
FROM   link_stat
WHERE  substr(url, 0, 22) = "http://www.example.com";  

但我不断收到以下错误消息:

Your statement is not indexable. The WHERE clause must contain an indexable column.

任何有关如何使用附加语法以按“total_count”降序排列的建议都将不胜感激。

谢谢!

4

1 回答 1

1

url 现在是可索引的列。请参阅https://developers.facebook.com/docs/reference/fql/link_stat

您是否使用直接 where 子句来访问网址?

SELECT url,
       normalized_url,
       share_count,
       like_count,
       comment_count,
       total_count,
       commentsbox_count,
       comments_fbid,
       click_count
FROM   link_stat
WHERE  url = "www.example.com";  
于 2013-02-04T07:52:53.790 回答