在 Amazon SimpleDB 上执行排序/排序的结果不均匀
我尝试从 Amazon SimpleDB 请求按数字排序的记录列表时,得到的结果非常参差不齐。
我用零填充我的数字以按字典顺序选择它们,但仍然没有运气。这两个查询给出相同的结果,例如:
select * from cbcallers where calls_completed is not null order by calls_completed desc select * from cbcallers where calls_completed is not null order by calls_completed asc
但是,我使用亚马逊的查询语言得到了正确的结果:
['calls_completed'starts-with ''] sort 'calls_completed' desc
上周,我从同一查询中得到不同(无序)结果数据集。有人知道怎么回事吗?我的查询被劫持了吗?
数据集如下所示:
Sdb-Item-Name, calls_completed, name, icon 8uda23sd7, 0000002, john smith, /myimgicon.jpg 8uda5asd3, 0000015, john smarts, /myimgicon2.jpg 8udassad8, 0000550, john smoogie, /myimgicon3.jpg
I've been getting really uneven results trying to request a numerically sorted list of records from Amazon SimpleDB.
I am zero padding my numbers to get them selected lexigraphically, but still no luck. These two queries are giving the same result, for example:
select * from cbcallers where calls_completed is not null order by calls_completed desc select * from cbcallers where calls_completed is not null order by calls_completed asc
However, I am getting the correct results using Amazon's query language:
['calls_completed'starts-with ''] sort 'calls_completed' desc
And last week, I was getting different (unordered) results from this query on the same dataset. Anyone have any idea what's up? Is my query jacked?
The dataset looks like this:
Sdb-Item-Name, calls_completed, name, icon 8uda23sd7, 0000002, john smith, /myimgicon.jpg 8uda5asd3, 0000015, john smarts, /myimgicon2.jpg 8udassad8, 0000550, john smoogie, /myimgicon3.jpg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的查询看起来完全正确。我加载了您的数据并逐字使用您的查询,并得到了您所期望的结果。
升序:
降序:
也许是您的 SimpleDB 客户端的问题,您使用的是哪一个,您知道它是否使用最新的 SimpleDB API 版本(“2009-04-15”)?
Your query looks completely correct. I loaded your data and used your queries verbatim and got just what you would expect.
Ascending:
Descending:
Maybe it is an issue with your SimpleDB client, which one are you using, do you know if it is using the latest SimpleDB API version ("2009-04-15")?