MySQL & SQL Interview Questions
Joins, indexing, transactions, MVCC, EXPLAIN, window functions, CTEs, replication, and query optimization.
Showing 1–20 of 100
#1What are the different types of SQL JOINs?
#2How does indexing work in MySQL (InnoDB)?
#3What is a covering index?
#4What are MySQL transaction isolation levels?
#5What is MVCC (Multi-Version Concurrency Control) in InnoDB?
#6How do you use EXPLAIN to analyze a query?
#7What are window functions in SQL?
#8What are CTEs (Common Table Expressions) and when should you use them?
#9What is the N+1 query problem and how do you fix it?
#10What is a deadlock in MySQL and how does it occur?
#11What is the difference between DELETE, TRUNCATE, and DROP?
#12How do you optimize a slow MySQL query?
#13What is database normalization?
#14What is MySQL replication and how does it work?
#15What is partitioning in MySQL?
#16What is GROUP BY vs HAVING in SQL?
#17What is a stored procedure and when should you use it?
#18How does the InnoDB storage engine handle locking?
#19What is the difference between UNION and UNION ALL?
#20How do you design a schema for a multi-tenant SaaS application?
Showing 1–20 of 100
Ask Aria about MySQL & SQL
Sign in to chat with Aria
All 100 MySQL & SQL questions at a glance
- What are the different types of SQL JOINs?(Easy)
- How does indexing work in MySQL (InnoDB)?(Medium)
- What is a covering index?(Medium)
- What are MySQL transaction isolation levels?(Hard)
- What is MVCC (Multi-Version Concurrency Control) in InnoDB?(Hard)
- How do you use EXPLAIN to analyze a query?(Medium)
- What are window functions in SQL?(Hard)
- What are CTEs (Common Table Expressions) and when should you use them?(Medium)
- What is the N+1 query problem and how do you fix it?(Medium)
- What is a deadlock in MySQL and how does it occur?(Medium)
- What is the difference between DELETE, TRUNCATE, and DROP?(Easy)
- How do you optimize a slow MySQL query?(Hard)
- What is database normalization?(Medium)
- What is MySQL replication and how does it work?(Hard)
- What is partitioning in MySQL?(Hard)
- What is GROUP BY vs HAVING in SQL?(Easy)
- What is a stored procedure and when should you use it?(Medium)
- How does the InnoDB storage engine handle locking?(Hard)
- What is the difference between UNION and UNION ALL?(Easy)
- How do you design a schema for a multi-tenant SaaS application?(Hard)
- What is the difference between a clustered and a non-clustered index?(Medium)
- How does MySQL handle AUTO_INCREMENT?(Easy)
- What are covering indexes and how do they improve performance?(Medium)
- What is the EXPLAIN output and how do you read it?(Medium)
- What are database triggers and when should you avoid them?(Medium)
- What is a foreign key constraint and what are its performance implications?(Medium)
- What is the difference between CHAR and VARCHAR?(Easy)
- How do you implement full-text search in MySQL?(Medium)
- What is the difference between MyISAM and InnoDB?(Easy)
- How does MySQL replication work and what are its modes?(Hard)
- What is a deadlock in MySQL and how does InnoDB handle it?(Hard)
- What are MySQL stored procedures and when should you use them?(Medium)
- How do you perform a slow query analysis in MySQL?(Medium)
- What is InnoDB buffer pool and how do you size it?(Hard)
- What is the difference between HAVING and WHERE?(Easy)
- What is MySQL's query cache and why was it removed?(Medium)
- How do you back up a MySQL database without downtime?(Medium)
- What is the difference between optimistic and pessimistic locking in MySQL?(Medium)
- What are MySQL partitioning types and when do you use them?(Hard)
- How do you handle large data migrations in production?(Hard)
- What is the difference between IN, EXISTS, and JOIN for subqueries?(Medium)
- What is the InnoDB redo log and undo log?(Hard)
- How do you implement pagination in MySQL efficiently?(Medium)
- What are the different types of JOINs in MySQL?(Easy)
- What is group replication and InnoDB Cluster?(Hard)
- What is the difference between a view and a materialized view?(Medium)
- How does MySQL's optimizer choose an execution plan?(Hard)
- What are common MySQL performance anti-patterns?(Medium)
- What is a generated column in MySQL?(Medium)
- What are the best practices for MySQL schema design?(Medium)
- How do you use MySQL's JSON column type?(Medium)
- What is the difference between transaction isolation levels in MySQL?(Hard)
- How do you handle hierarchical data in MySQL?(Hard)
- What is ProxySQL and how is it used?(Medium)
- What is MVCC and how does InnoDB implement it?(Hard)
- How do you detect and fix index fragmentation in MySQL?(Medium)
- What are the MySQL 8.0 improvements over MySQL 5.7?(Medium)
- How do you design a schema for audit logging?(Medium)
- What is binlog and how is it used for CDC?(Hard)
- How do you use MySQL's performance_schema?(Hard)
- What is the difference between COUNT(*), COUNT(1), and COUNT(col)?(Easy)
- What is a composite index and how should you order columns?(Hard)
- How do you implement soft delete in MySQL?(Medium)
- What is the difference between CHAR, VARCHAR, TEXT, and BLOB?(Easy)
- How does MySQL handle concurrent writes to the same row?(Hard)
- What is the difference between schema-on-write and schema-on-read?(Medium)
- How do you handle time zones in MySQL?(Medium)
- What is the difference between a unique constraint and a unique index?(Easy)
- How do you monitor MySQL in production?(Medium)
- What are window functions and how do you use them?(Medium)
- How do you implement row-level security in MySQL?(Hard)
- What is the difference between a primary key and a unique key?(Easy)
- How do you use MySQL's event scheduler?(Medium)
- What is the EXPLAIN ANALYZE command?(Medium)
- How do you handle database connection failures in application code?(Medium)
- What is the MySQL query execution order?(Medium)
- How do you scale MySQL reads?(Medium)
- What is the difference between row-based and statement-based replication?(Medium)
- How do you use CTEs (Common Table Expressions) effectively?(Medium)
- What is the difference between TRUNCATE, DELETE, and DROP?(Easy)
- How do you implement optimistic locking with versioning in MySQL?(Medium)
- What are the different ways to copy a table in MySQL?(Easy)
- What is the purpose of the information_schema?(Medium)
- What is innodb_flush_log_at_trx_commit and how does it affect durability?(Hard)
- How do you implement full-table search across millions of rows efficiently?(Medium)
- What is the max_connections parameter and how do you tune it?(Medium)
- What is a spatial index in MySQL and how is it used?(Hard)
- What is the difference between ROLLUP and CUBE in SQL?(Medium)
- How do you handle NULL values in MySQL queries?(Medium)
- What is the difference between a read and a write transaction?(Medium)
- How do you implement a queue in MySQL?(Hard)
- What is the mysql.user table and how does MySQL authentication work?(Medium)
- What is index merge optimization?(Hard)
- How do you detect and resolve replication lag?(Hard)
- What is the difference between MyISAM and InnoDB row format?(Hard)
- How do you implement rate limiting at the database level?(Hard)
- What is the difference between REPEATABLE READ and READ COMMITTED in practice?(Hard)
- What are MySQL's data types for storing money?(Medium)
- How do you handle schema evolution in a microservices environment?(Hard)
- What is the difference between DATETIME and TIMESTAMP in MySQL?(Easy)