0

I have a few doubts about indexs in databases:

  1. Suppose i have a table 'student':

    id  name  age  class  roll_no
    1   vijay 24   12     1007
    2   vinay 25   10     1008
    

    if i write select * from student where name='vijay';

    1. If i have index on column name then it will search for index name in index table ? Can i check index table data how does it store data ?
    2. If i don't have index then it will search for only name column or entire row starting from first row's id, then name and so on.... and then second row ?
    3. Is indexes can be created on non unique column's ?
Jim Jones
  • 15,944
  • 2
  • 28
  • 37
Deepak Kumar
  • 119
  • 1
  • 13

1 Answers1

0

Read here for more info on indexes. http://postgresguide.com/performance/indexes.html

Edit: Rectified for postgresql

Google a bit before asking questions.

Yuvraj Jaiswal
  • 1,504
  • 10
  • 18