So, I looked at the index literature in MySQL, but the following still confuse me. It has been explained that an index can slow down a MySQL query in terms of computational time. It was explained that this is based on queries that work with a table with a specified index called say index_A . I understand that at some point MySQL should rewrite its index file for index_A as a result of UPDATE, INSERT, or DELETE queries that appear in the corresponding tables. I donβt understand how exactly this is happening. Should this happen after every UPDATE, INSERT or DELETE? (This does not seem to be the case). Or is it necessary to perform a certain number of these operations before issuing a rewrite? (In which case, how do I know how much?) Or does it depend on the engine used for this table? Basically, I want to better understand what might cause my indexes to slow down queries so that I can better avoid this in the production process. Please let me know if anything I asked is unclear and thank you for your time.
Edit: It seems that the answer lies in a better understanding of Rtivs and Betry. These are the structures used to manage indexes on different machines in MySQL. I will continue to consider these issues and, I hope, will publish a definite answer regarding my results in the near future.
source share