New answers tagged schema
1) Yes. It's a maintenance/documentation nightmare but technically there's no reason it wouldn't work. 2) In general each null will be one bit of storage. So 80 null fields might be 10 bytes per row. The full answer is that it varies depending on data type but with varchar for the most part it's a good rule of thumb. Some alternatives where you expect ...
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. ...
visits for a page for a period of time: INDEX(page_id, hour) visits for a period of time: INDEX(hour) Your primary key, plus these, are not redundant; have them all. Recommend you keep sum_time, not avg_time, then compute the avg as SUM(sum_time) / SUM(visits). (The average of averages is not mathematically correct.)
The primary key is always indexed. This is the same for MyISAM and InnoDB, and is generally true for all storage engines that at all supports indices. Refer link
There are many third party tools out there which will do schema and data compare, and synchronization. My personal favorites are xSQL Schema Compare for schema comparisons and xSQL Data Compare for data comparisons between objects with the same schema. Hope this helps!
At TwinDB we built a web interface to mysqlfrm. It's free and easy to use. To recover table structure from you just need to upload the .frm file. Here are steps. 1. Open https://recovery.twindb.com/ . Click on "Recover Structure" In next submenu click on "from .frm file" On the next view click on "Browse" and select an .frm file on a local disk. Click ...
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 ...
Top 50 recent answers are included