vishesh92 commented on PR #8737:
URL: https://github.com/apache/cloudstack/pull/8737#issuecomment-1981393977

   > 
   > @vishesh92, from the description of your PR:
   > 
   > ```
   > This PR adds the upgrade path for 4.19 to 4.19.1 and creates two missing 
indexes on vm_stats table
   > ...
   > 2. vm_stats -> timestamp - To speed up clean up of old vm_stats.
   > ```
   > 
   > You're proposing the addition of an index on the `timestamp` column to 
speed up the deletion of old records on `vm_stats`. Why would you test a 
**SELECT** and not a **DELETE**? Could you share the tests results using a 
**DELETE** query?
   
   @JoaoJandre We can't run explain analyze with delete commands. Adding the 
index also helps reduce the load on database while cleaning up the entries. 
Otherwise the DB will have to go through each record to filter out all the 
entries which can cause spike in I/O as well. I understand that if the 
administrator reduces the retention period, it can cause issues but having the 
index will speed up deletion which runs every minute.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to