DeveloperBreeze

Sql Guide Development Tutorials, Guides & Insights

Unlock 2+ expert-curated sql guide tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your sql guide skills on DeveloperBreeze.

Managing Transactions and Concurrency in MySQL

Tutorial August 12, 2024
mysql

  • A basic understanding of SQL and MySQL operations.
  • Access to a MySQL server for executing sample queries.

A transaction is a sequence of one or more SQL operations that are executed as a single unit of work. Transactions have four key properties, often referred to as ACID:

Viewing the Database Size and Identifying the Largest Table in MySQL

Tutorial August 12, 2024
mysql

Execute the following query, replacing your_database_name with the name of your database:

SELECT table_schema AS "Database",
       ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)"
FROM information_schema.tables
WHERE table_schema = 'your_database_name'
GROUP BY table_schema;