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
  • 18,404
  • 3
  • 35
  • 44
Deepak Kumar
  • 129
  • 2
  • 13
  • 1
    https://www.postgresql.org/docs/current/static/indexes.html and https://use-the-index-luke.com/ –  Mar 15 '18 at 10:23

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,605
  • 13
  • 20