I have a table t1 and two indexes:
create index if not exists timeindex on t1(time, "Bytes Received")
create index if not exists filenameindex on t1(filename)
The following query is fast enough:
select "Bytes Received" from t1 where time>="11:19:31.18" and time <= "11:19:36.18"
But when I add an extra condition to the WHERE clause, the query slows down a lot
select "Bytes Received"
from t1
where time>="11:19:31.18" and time <= "11:19:36.18"
and filename = "SE12.log"
I tried to create a new index t1(time, "Bytes Received", filename), but the execution speed did not change.
How do I change indexes on a table to speed up a query?
source
share