technical skills grow

Responsive Ads Here

Wednesday, October 27, 2021

Part-11 Cover Index & Reindex in Postgres

 Cover Index :

It contains all the columns which query use That means we have to use all the columns which are available in select statement , as well as in WHERE statement to create our cover index

Create Cover Index :



Your indexes can go slower with the time if you have very heavy OLTP workload. if you have lots of insert , update or deletes operation on your table, it's quite possible your data has moved around a lot in your table, and it has created a lot of empty spaces in your B-tree indexes. if your table is not changed much, you do not need to reindex it, but if it is changed quite a lot, then it is very, important that you 
remove all of the inefficiency of index by reindex it periodically. Reindexing it will improve performance of your index very much. It is absolutely a safe operation , and with syntax concurrently, You should execute this command only on those tables where there is heavy  OLTP workload and you should run it periodically.
Example: I reindex all of my table where there is significant change every week. That means I have a job which executes once a week on the table where I have  slow performance. Let's understand the syntax of reindex 


No comments:

Post a Comment

Powered by Blogger.

Labels

Contact Form

Name

Email *

Message *

Search This Blog

Blog Archive

Ad Code

Responsive Advertisement

Recent Posts