taosdata / TDengine

TDengine is an open source, high-performance, cloud native time-series database optimized for Internet of Things (IoT), Connected Cars, Industrial IoT and DevOps.

Home Page:https://tdengine.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

range too large when database using precision=us(or ns) and query with interval(1n)

jiumar19 opened this issue · comments

Is there something wrong with time window query when database using precision 'us' (or 'ns')

taosd version: 3.3.0.3

  1. create database test_db precision 'us';

  2. create stable if not exists test_table (ts timestamp,vol int) tags ( pos binary(64));

  3. insert into test_client using test_table tags ('somewhere') values (now,1);

  4. select _wstart,count(*) from test_table where ts>='2024-01-01' and ts <='2024-10-01' interval(1n) fill(value,0);
    server resp: Query OK, 10 row(s) in set (0.004353s)

  5. select _wstart,count(*) from test_table where ts>='2024-01-01' and ts <='2024-11-01' interval(1n) fill(value,0);
    server resp: DB error: Start(end) time of query range required or time range too large (0.000702s)

  6. select _wstart,count(*) from test_table where ts>='2024-01-01' and ts <='2024-11-01' interval(1n);
    server resp: Query OK, 1 row(s) in set (0.003900s)

if I set database precision='ms', all the queries above are running well