Perfect — let’s build a comprehensive list of 100 different types of development-related problems in MySQL programming. I’ll group them by categories (schema design, indexing, queries, transactions, replication, performance, security, etc.) so it’s structured and easier to navigate.
🔹 Schema Design Problems
- Using
VARCHAR(255)
everywhere without reason. - Storing numbers as
VARCHAR
instead ofINT/DECIMAL
. - No primary key in tables.
- Overuse of composite primary keys.
- Using
TEXT
whereVARCHAR
is sufficient. - Storing JSON in
TEXT
instead ofJSON
type. - Not normalizing repeated fields (1NF violation).
- Over-normalization leading to too many joins.
- Using ENUM where lookup tables are better.
- Schema drift between dev, test, and prod databases.
🔹 Indexing Problems
- Missing indexes on foreign keys.
- Duplicate indexes created accidentally.
- Over-indexing tables, slowing down writes.
- Using
FULLTEXT
whereLIKE '%...%'
would suffice. - No composite index for multi-column WHERE clauses.
- Wrong index order (
INDEX(a,b)
vsINDEX(b,a)
). - Indexes not used due to datatype mismatch.
- Index fragmentation over time.
- Unused indexes wasting storage.
- Index not covering query (forcing table lookups).
🔹 Query Writing Problems
SELECT *
used in production queries.- Hard-coded values instead of parameters.
- Queries not parameterized (SQL injection risk).
- Cartesian product from missing join conditions.
- Using subqueries instead of JOINs.
- Correlated subqueries slowing performance.
- Misuse of
DISTINCT
to “fix” duplicate joins. - ORDER BY without an index.
- GROUP BY non-indexed column.
- HAVING used instead of WHERE.
- Joins across different collations.
- Using
IN (SELECT ...)
instead ofJOIN
. - LIKE with leading wildcard (
'%value'
). - Misuse of UNION instead of UNION ALL.
- Query depending on implicit type casting.
🔹 Transaction & Concurrency Problems
- Forgetting to
COMMIT
in transactions. - Long-running transactions locking rows.
- Deadlocks between concurrent transactions.
- Phantom reads in REPEATABLE READ isolation.
- Lost updates from concurrent
UPDATE
. - Unnecessary use of SERIALIZABLE isolation.
- Lock escalation on large updates.
- Gap locks blocking inserts.
- Using autocommit when multiple operations need atomicity.
- Forgetting to rollback on error.
🔹 Replication & Clustering Problems
- Replication lag causing stale reads.
- Non-deterministic functions (
NOW()
,RAND()
) in statements replicated. - Large transactions slowing replication.
- Row vs statement-based replication mismatch.
- GTID replication conflicts after failover.
- Replication break due to schema drift.
- Circular replication loops.
- Writes going to read replicas accidentally.
- Incorrect failover handling in application.
- Binlog corruption breaking replication.
🔹 Stored Procedures & Functions Problems
- Lack of error handling inside stored procs.
- Overuse of stored procedures for business logic.
- Recursive stored procedure calls causing stack overflow.
- Deterministic flag misused in stored functions.
- Procedures returning inconsistent result sets.
- Using triggers for application logic.
- Multiple triggers on same event causing order dependency.
- Infinite trigger loops (insert/update triggers firing each other).
- Triggers silently failing without raising error.
- Using UDFs with untrusted code.
🔹 Performance Problems
- Table scans due to missing indexes.
- Slow joins with large intermediate results.
- Temporary table creation on disk.
- Filesort for ORDER BY without index.
- Using OFFSET in pagination causing slow queries.
- Non-sargable queries (
WHERE YEAR(date)=2025
). - Query plan changes due to bad statistics.
- MySQL choosing wrong index.
- Large IN() lists slowing optimizer.
- Ignoring EXPLAIN for query analysis.
🔹 Storage Engine Problems
- Mixing InnoDB and MyISAM incorrectly.
- Forgetting to use InnoDB for transactions.
- MyISAM table crashes requiring repair.
- InnoDB buffer pool too small for workload.
- Temp tables on disk because MEMORY engine not used.
- Incorrect use of MEMORY tables for large datasets.
- Failure to adjust
innodb_log_file_size
for big transactions. - Foreign keys ignored in MyISAM tables.
- Too many partitions (overhead > performance gain).
- Poor sharding strategy.
🔹 Migration & Version Upgrade Problems
- Breaking changes between MySQL versions.
- Collation changes breaking string comparisons.
- Default authentication plugin mismatch (
caching_sha2_password
vsmysql_native_password
). - Deprecated features still in use (
TIMESTAMP DEFAULT 0
). - Migration script dropping indexes unintentionally.
- Data truncation during migration.
- Incompatible schema with ORMs.
- Downgrade not possible after upgrade.
- Application not tested against new optimizer.
- Timezone mismatches after upgrade.
🔹 Security Problems
- Hardcoded MySQL credentials in source code.
- No TLS encryption between app and DB.
- Over-granting privileges (
GRANT ALL ON *.*
). - SQL injection from dynamic queries.
- No audit logging for sensitive queries.
✅ That’s 100 MySQL programming problems across all major aspects of development. They range from schema design flaws to security issues, touching the entire lifecycle of database-backed software.