TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

1.6.6.1 The result of SQL condition filtering does not match expectations

Open Memorry0 opened this issue 6 years ago • 3 comments

版本是1.6.6.1,有一张超级表,然后在该超级表中建了49000张子表,但是输入条件直接查询子表的结果与条件明显不一样。 想问下是否有操作的问题,以及如何解决。

taos> select * from tag_0000000001 where createTime > 20-08-12 12:58:11.000000 limit 10; DB error: invalid SQL: syntax error near "12:58:11.000000 limit 10;" 提示语法不对,然后再次查询加上了单引号。

taos> select * from tag_0000000001 where createTime > '20-08-12 12:58:11.000000' limit 10; createtime | markid |currentday | temperature |isnormal|

20-08-12 12:58:10.505463| 308846| 20200812| 39.000000000| false| 20-08-12 12:58:10.505464| 2927357| 20200812| 37.000000000| true| 20-08-12 12:58:10.505465| 27434| 20200812| 36.000000000| false| 20-08-12 12:58:10.505466| 285446| 20200812| 38.000000000| true| 20-08-12 12:58:10.505467| 2342267| 20200812| 37.000000000| false| 20-08-12 12:58:10.505468| 3784670| 20200812| 38.000000000| true| 20-08-12 12:58:10.505469| 311387| 20200812| 38.000000000| false| 20-08-12 12:58:10.505470| 685744| 20200812| 39.000000000| true| 20-08-12 12:58:10.505471| 2332824| 20200812| 38.000000000| false| 20-08-12 12:58:10.505472| 3119753| 20200812| 37.000000000| true| Query OK, 10 row(s) in set (0.003230s)

我的预期应该是查不出数据的,我翻阅文档后,发现我的语法并没有错误(即使查询条件为'20-08-15 13:00:00'这种未来的时间也能查出结果),想问下这种是否是我操作不当还是需要修改配置才能让查询支持微秒?

Memorry0 avatar Aug 12 '20 07:08 Memorry0

这是查询时的图片:https://imgchr.com/i/avKs6x

Memorry0 avatar Aug 12 '20 07:08 Memorry0

微秒查询请参考博客:https://www.taosdata.com/blog/2020/05/09/1502.html,这是另外的一个功能。 另外,现在版本已经升级到2.0了,很多bug都已经不存在,建议您更到最新版本,这些老版本逐渐都不再维护了。

Aries-Lee1991 avatar Aug 12 '20 08:08 Aries-Lee1991

2.0.0.1无法在虚拟机上启动,一直连不上server,但用1.6的版本一下就可以了,所以我才暂时放弃用2.0......

Memorry0 avatar Aug 12 '20 08:08 Memorry0