0

Are there some who has experience of optimizing taos sql. I'm in a situation bellow. I queried one days's trace info from history trace log. Nearly queried 10 million rows from 100 million rows among 10 days.I spent 40 minutes.my sql is bellow:

select busi_dt,tx_dt,bill_no,prd_no.......,occur_date from trace_log where occur_date='2021-08-02;'

the column[busi_dt] is timestamp, [occur_date] is binary(8); I know that if i can use the first column [busi_dt],the speed can be very fast because of the index. But my situation is not allowed here,[busi_dt] has no regular relation with [occur_date]. so what can i do optimize my sql execution speed.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Ray Shown
  • 33
  • 6

1 Answers1

0

I think using 'select ... where ... from begin_time to end_time' could utilize time-series database advantage to quickly locate the data files from hard disk. Worth trying.

Shuduo
  • 727
  • 5
  • 14