Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    2

    Unanswered: Tell me something about Indexes

    Hi !

    Tell Me something about Indexes .
    There is Table Name Emp
    EmpId int
    Ename varchar

    and there is Index on Ename
    Tell me in which case index will be used

    1 Select ename from emp where ename = 'abc'
    2. Select ename from emp where ename like 'abc%'

    Please help me .

  2. #2
    Join Date
    Jan 2003
    Posts
    10

    Re: Tell me something about Indexes

    Hi,

    the index can be used in both cases.

    If you are using the RuleBasedOptimizer then the index will be used in both cases.

    If you are using the CostBasedOptimizer then the use of an index depends on several statistics (number of rows in the table, selectivity of the column, etc.).

    regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •