Mysql Archives - 7-Views

Disable ONLY_FULL_GROUP_BY

Posted by
October 11, 2022

If you want to disable this from Ubuntu 18+ please follow following details. Go To Command Prompt cd /etc/mysql/conf.d sudo nano disable_strict_mode.cnf and add following Snippet [mysqld] sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION save and then restart and mysql. it will work.  

read more

MySQL – UPDATE query with LIMIT

Posted by
July 24, 2019

Many a times there are certain conditions where ou want to update your records with certain limit attached to it. To update multiple rows using limit in MySQL can be implement by a query: UPDATE table_name SET field=’1′ WHERE id IN (SELECT id FROM (SELECT id FROM table_name LIMIT 0, 10) tmp);  

read more

Defragment to Recover Space in MYSQL

Posted by
August 24, 2018

If our application is performing a lot of update delete operations on a certain table then there is high possibility that it contains fragmented space. The OPTIMIZE TABLE statement allows MySQL DBAs to reorganize physical table storage in order to achieve three main goals: Shrinks the data pages Shrinks index pages Computes Fresh Index Statistics […]

read more