![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
-- both indexes select --+ index(i xi) index(i yi) count(1) from intervals i where 500 between x and y; 18 sec -- one index select --+ index(i xi) count(1) from intervals i where 500 between x and y; 16 sec |
#22
| |||
| |||
|
|
Your k is really a constant or is someting like log(n)/n ? k is a constant. I don't claim that my assumption is correct. But until someone else can give a motivation why the assumption is wrong, I have to assume that it is correct. You can also look at the actual query plan to see what operations would be performed. Nobody here seem to be able to provide an answer. Just trial an error. |
#23
| |||
| |||
|
#24
| |||
| |||
|
|
I would add that your interval is a set and you know the relational model don't like sets as attributes. |
![]() |
| Thread Tools | |
| Display Modes | |
| |