Posts

Showing posts from August, 2020

What is idempotent operation

Idempotent, in programming and mathematics, is a property of some operations such that no matter how many times you execute them, you achieve the same result. In programming, idempotent can be a property of many different code elements, including functions, methods, requests and statements. Idempotent is a language-agnostic property: It means the same thing in any programming context. Here’s a simple demonstration of idempotent in HTTP requests: HTTP GET requests are a method of retrieving specified data from a source, such as getting a bank account balance. GET requests are idempotent: Accessing the same data should always be consistent. On the other hand, POST requests are designed to change the target, such as adding a sum to a bank account. As such, a POST request should change the result and that means it’s not idempotent. In computing, an idempotent operation is one that has no additional effect if it is called more than once with the same input parameters. For example, removing

How to truncate the Slow Query Log on AWS RDS MySQL

I was in need to empty the slow_log table in MySQL database inside a Amazon Relational Database System to look into a performance issue. But I got the below error. I was surprised because I had login with the master user of the RDS. mysql> use mysql mysql> truncate table slow_log Error Code: 1044. Access denied for user 'dbroot'@'%' to database 'mysql' On surfing the internet I got this and it resolved my problem. "Amazon RDS will not give you SSH access to its database server. That means you don’t have the opportunity to view any of the log files, even the slow query log, for the database. But RDS provides a way to play with the slow queries. If your slow queries are many then this table will hold too many queries to handle. You cannot truncate the table or delete any row from there. There is only a way to move all the data from this table to another table named ‘slow_log_backup’, making the slow_log table empty. To do so you have to run a stored pro
Back To Top