What is the effect of removing or deleting a index while the table is being use?



table: order_tbl index: order_id_index(not btree)


need to change it to index:order_id_index(btree)

is there an impact or data lost while/after delete the index?

1 Answer 1


You cannot drop an index while the table is being used, because dropping an index requires a (short) ACCESS EXCLUSIVE lock on the table, which conflicts with any concurrent access.

No data get lost when you drop an index, but the performance of queries could suffer drastically. If the new index is a replacement for the old one, you could create the new index with a different name, drop the old index and then rename the new index.

  • Thanks for your answer sir that's really helps me to proceed to my task
    – Nullified
    Jun 9 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.