Thanks! I hope that it will work faster.

If you have any links to articles describing such dark sides of SQLite
or some techniques of using it such as this, I'll be very grateful if
you write them here.


Pavel Ivanov wrote:
> Yes, you will be able to find information you need. You can store your
> data like this:
> 
>  time  |  val_num  |  value  |
> --------|-----------|-----------|
> [time_1]   1   [value_1.1]
> [time_1]   2   [value_2.1]
>  ...
> [time_1] XXXX [value_XXXX.1]
> [time_2]   1   [value_1.2]
> [time_2]   2   [value_2.2]
>  ...
> [time_2] XXXX [value_XXXX.2]
> [time_3]   1   [value_1.3]
> [time_3]   2   [value_2.3]
>  ...
> [time_3] XXXX [value_XXXX.3]
> 
> Then your select will look like this:
> 
> SELECT ...
> FROM table_name t1, table_name t2, table_name t456, table_name t654
> WHERE t1.time > 1000 AND t1.time < 1500
> AND t1.time = t2.time
> AND t1.time = t456.time
> AND t1.time = t654.time
> AND t1.val_num = 1
> AND t2.val_num = 2
> AND t456.val_num = 456
> AND t654.val_num = 654
> AND (t1.value > t2.value + 3 OR t456.value != t654.value)
> 
> 
> It looks like it's more complicated but I believe it will work faster
> than your multi-column approach.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to