![]() | |
![]() |
| | Thread Tools | Display Modes |
#31
| |||
| |||
|
|
Hi I have a table T with columns A, B, C and an index I over all three columns. Further, I have a query which uses columns A and B, but not C, i.e. SELECT * FROM T WHERE a = ? AND b = ? I gather Oracle is able to use index I even though the last column is not used. My question is the following: If I write a query like SELECT * FROM T WHERE a = ? AND b = ? AND c = ? with a condition for C that, for the data in T, is known to be true always, will that query be generally slower or faster than the one above, or is there no difference in performance, or does it depend on the complexity of the index? Thanks for a little insight, Peter |
#32
| |||
| |||
|
|
Hi I have a table T with columns A, B, C and an index I over all three columns. Further, I have a query which uses columns A and B, but not C, i.e. SELECT * FROM T WHERE a = ? AND b = ? I gather Oracle is able to use index I even though the last column is not used. My question is the following: If I write a query like SELECT * FROM T WHERE a = ? AND b = ? AND c = ? with a condition for C that, for the data in T, is known to be true always, will that query be generally slower or faster than the one above, or is there no difference in performance, or does it depend on the complexity of the index? Thanks for a little insight, Peter |
#33
| |||
| |||
|
|
Hi I have a table T with columns A, B, C and an index I over all three columns. Further, I have a query which uses columns A and B, but not C, i.e. SELECT * FROM T WHERE a = ? AND b = ? I gather Oracle is able to use index I even though the last column is not used. My question is the following: If I write a query like SELECT * FROM T WHERE a = ? AND b = ? AND c = ? with a condition for C that, for the data in T, is known to be true always, will that query be generally slower or faster than the one above, or is there no difference in performance, or does it depend on the complexity of the index? Thanks for a little insight, Peter |
![]() |
| Thread Tools | |
| Display Modes | |
| |