|
|
|
|
|
by fendale
6195 days ago
|
|
Well, certainly in Oracle, it can use an index on a like if it is structured: where col like 'str%'
However, doing where col like '%str'
Means it cannot use any index. So in the example given, it would be able to use an index because there is a leading 'path' before the %, assuming MySQL can do the same thing.In Oracle you can do hierarchy query's using the 'connect by' syntax, which means you can structure your table with id, parent_id and get all the rows out efficiently in a single piece of SQL, which is nice! |
|