Break index condition
435737Jul 31 2006 — edited Jul 31 2006Hi friends,
reading Oracle documentation, I've seen the following about building indexes:
"The query can be rewritten using LIKE so that the indexed column is only on one side of the operator.
SELECT account_name, trans_date, amount
FROM transaction
WHERE account_name LIKE NVL(:acc_name, `%')
"
If I have an index on account_name column... I thinked that a LIKE in the where clause like this... would break the index... Is that correct?
Another question:
Is there any max number of columns recomended to build an index...?
(I have a table with 39 columns and I have an index for 6 columns.. )
I've read that the columns's order when we build the index could be important for tunning questions... any opinions?
Thanks.
Jose.