1.

How do you define Indexes in PostgreSQL?

Answer»

Indexes are the INBUILT FUNCTIONS in PostgreSQL which are USED by the queries to perform search more efficiently on a table in the database. Consider that you have a table with thousands of records and you have the below QUERY that only a few records can satisfy the condition, then it will take a lot of time to search and return those rows that abide by this condition as the engine has to perform the search operation on every SINGLE to check this condition. This is undoubtedly inefficient for a system dealing with huge data. Now if this system had an index on the column where we are applying search, it can use an efficient method for identifying matching rows by walking through only a few levels. This is called indexing.

Select * from some_table where table_col=120


Discussion

No Comment Found