June 18, 2013

Post: Recovery after DROP & CREATE

… NULL, `last_name` varchar(45) NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`actor_id`), KEY `idx_actor_last_name…) NOT NULL, ->   last_name VARCHAR(45) NOT NULL, ->   last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ->   PRIMARY KEY  (actor_id), ->   KEY idx_actor_last…

Post: Connecting orphaned .ibd files

… of page’s latest log record FIL_PAGE_TYPE 2 current defined types are: FIL_PAGE_INDEX, FIL_PAGE_UNDO_LOG… NULL, last_name VARCHAR(45) NOT NULL, last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (actor_id), KEY idx_actor_last_name… space #15 … Skipped output… SYS_TABLES is updated successfully … Skipped output… SYS_INDEXES is updated successfully It is possible that space_id…

Comment: How to find wrong indexing with glance view

… you’re requiring that deletes / updates cascade from the parent to child tables – naturally an index on the referencing columns in the…) not null, order_date datetime not null, last_updated timestamp not null default current_timestamp on update current_timestamp, foreign key(item_type_id) references item_types(item…

Post: Testing InnoDB "Barracuda" format with compression

… SET latin1 NOT NULL, `published` timestamp NOT NULL DEFAULT ’0000-00-00 00:00:00′, `crawled` timestamp NOT NULL DEFAULT ’0000-00… NULL, `author_id` int(10) unsigned NOT NULL, `inserted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fromfile` varchar(255) NOT NULL, `language_id` tinyint…

Comment: How to find wrong indexing with glance view

realize I pressed submit too soon and had some typos on the FKs definitions: create table orders( order_id int unsigned…) not null, order_date datetime not null, last_updated timestamp not null default current_timestamp on update current_timestamp, foreign key(item_type_id) references item_types(item…

Post: Long PRIMARY KEY for Innodb tables

… you do not end up having random primary key BTREE updates which can be very expensive. Today I would like to…` tinyint(3) unsigned NOT NULL default ’0′, `ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`url`,`thumb_width`,`thumb_height`) ) ENGINE=InnoDB…

Post: Joining on range? Wrong!

… scanned. And we have proper indexes on all necessary columns! What does EXPLAIN…timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP KEY `itm_prd_id__and__itm_order_timestamp` (`itm_prd_id`,`itm_order_timestamp…_date); UPDATE items_ordered SET itm_order_date = DATE(itm_order_timestamp); Now the …

Post: INSERT ON DUPLICATE KEY UPDATE and summary counters.

… takes advantage of is TIMESTAMP field. By default first TIMESTAMP column will have its value automatically updated to current timestamp on insert and update. We actually could… incremented and last visit timestamp updated. The benefit of using this feature insted of INSERT + UPDATE could be different, depending on number of new…

Post: Timezone and pt-table-checksum

CURRENT_TIMESTAMP.  From the manual, here is how MySQL handles timezone locality with timestamp fields: Values for TIMESTAMP columns are converted from the current…, we have “data drift” on both nodes: pt-table-checksum…PRIMARY`) WHERE (1=1) FOR UPDATE; When you update your session timezone (SET @@…

Post: Statistics of InnoDB tables and indexes available in xtrabackup

… the second reason is that running statistic on a stopped database is more accurate than …bigint(20) unsigned NOT NULL, `message_published` timestamp NOT NULL default CURRENT_TIMESTAMP, `kind` enum(‘link’,'img’) NOT NULL…, as table is really mostly inserted in, updates and deletes are rare). And let’s…