Hi Rajesh,
> If I execute the following query , will the index would be applied on the
> name field?
Well, the answer is depended on the position of the wildcard character.
For example, if filter pattern does not use the wildcard character (%) at
the very beginning of the filter ("organization%") then SQL engine can use
the characters before the first wildcard during filtering and so, the index
can be used.
In the opposite case (filter expression starts from %), the index cannot be
used and SQL engine has to scan the entire table.
You can check the plan of execution of your SQL expression with EXPLAIN.
explain select * from table where name like 'organization%';
the output will contain something like as follows:
SELECT ...
FROM ...
/*
PUBLIC.TABLE_FIELD_IDX: NAME >='organization' <-- this line indicates that
index was used
*/
...
Thanks,
Slava.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/