Got it

Index Rebuilding

Latest reply: Aug 15, 2019 00:52:45 767 2 12 0 3

For B-tree indexes, a large number of index keys on the index page will be deleted after

multiple delete or update operations on a database table. This results in index bloat. Therefore,

periodically rebuilding indexes can improve query efficiency.

LibrA supports the REINDEX statement for rebuilding indexes, but the execution is timeconsuming.

In practice, you can copy and save all B-tree index definitions from table-related

DDL statements, run the DROP INDEX statement to delete the corresponding indexes, reexecute

the saved index definitions, and rebuild these indexes.

Pay attention to the following when rebuilding an index:

l GIN or psort indexes do not need to be periodically rebuilt after being created.

l Set the execution interval of index rebuilding to once a month, and select a night period

(from 20:00 to 6:00 the next day) when system load is low. Running the crontab

command to periodically execute the GSQL script can be used as a reference.

l Before rebuilding an index, test and evaluate the operation time and ensure that the

operation can be completed within a specified time window.


Good
View more
  • x
  • convention:

Index Rebuilding
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.