Database Implode: A Catastrophic Disaster of Unparalleled Proportions

Caused by: Overly Complex Queries

On Tues, 2023-02-21 14:30 the server experienced a catastrophic database failure due to a query that was way too complex.

The offending query was:

SELECT * FROM customers WHERE customer_name LIKE 'John' AND order_date BETWEEN '2022-01-01' AND '2022-01-31' AND order_total > 1000 AND order_status IN ('pending', 'shipped', 'cancelled')

This query, while seemingly harmless, caused the database to spiral out of control, consuming all available resources and bringing the entire system to its knees.

Solutions That Are Actually Worse What We Can Do to Prevent This