Comments - MySQL "Wishlist" Session from an online travel agency

12 years, 9 months ago Michael Widenius

HIERARCHICAL CHECKSUMS (AUTOMATIC)

Mark a table (any engine) as USING_CHECKSUM.

The table will have a column which is automatically maintained, and each row contains a row checksum. The column may be visible, or there is a function to manually get to the checksum for a row. The checksum is maintained automatically, so when a row changes, the checksum is also being updated.

This is what you get with Aria and MyISAM when you create the table with CHECKSUM=1.

The checksum is transactionally updated and CHECKSUM table is instant.

Doing this in InnoDB would be a *lot* of work.

The checksums can be used for table content comparison for tools such as mk-table-sync, speeding up the process considerably.

This could be sped up even more if the checksums are hierarchical, that is, checksums for row-ranges, and ranges of row-ranges existed as well in a treelike structure. Two tables are identical in content if their toplevel checksums are identical. If their toplevel checksums differ, digging downward in the tree can reveal all differing rows very quickly.

Nice idea, but for that to work it would have to be integrated deeply in a storage engine and I don't know of any storage engines that has anything similar.

 
12 years, 2 months ago John S Wolter

I learned from this....thanks

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.