Hot answers tagged

3

This is taken from the MySQL documentation: Changes in MySQL 5.7.1 (2013-04-23, Milestone 11) ... If a column is declared as NOT NULL, it is not permitted to insert NULL into the column or update it to NULL. However, this constraint was enforced even if there was a BEFORE INSERT (or BEFORE UPDATE trigger) that set the column to a non-NULL value. ...


2

How many rows are being aggregated on each SELECT? This should go without saying - ensure you have an index on the datetime column. Depending on what your query is doing you can also try putting a compound index on your datetime and the column you're aggregating to try to only use the index and avoid reading data blocks off the disk. Please post an ...



Only top voted, non community-wiki answers of a minimum length are eligible