Indexes are a common way to enhance database performance. An index allows the database server to find and retrieve specific rows much faster than it could do without an index. Without index system would scan entire table row by row to find all the matching records. But indexes also add overhead to the database system as a whole, so they should be used sensibly.
Following command can be used to create index on one or more coulmns of a table.
While creation of index only by default postgres allows only reads to occur on the table. writes(INSERT, UPDATE, DELETE) are blocked. If Index creation takes longer time then it is often unacceptable. Indexes can be created concurently without blocking writes.