From: Michael Widenius Date: April 21 2008 6:25am Subject: re: ordering of duplicate keys List-Archive: http://lists.mysql.com/internals/35501 Message-Id: <18444.13122.384031.524332@nosik.mysql.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! >>>>> "Kathryn" == Kathryn Steinbrink writes: Kathryn> Hello, Kathryn> When processing key operations in the presence of duplicates, does MySQL Kathryn> care about the order of the duplicates? For example, is there some kind of Kathryn> FIFO or LIFO type ordering of the rows that should be honored when Kathryn> returning duplicate keys? Kathryn> Thanks! For most engines, the keys will be ordered according to row order or row id order. The row order is however quite random and may change during load/restore. The reason to have the keys in row order is that when you do a delete of a row it's much faster to find the corresponding key among lots of duplicates if keys are sorted according to row position / row id. Regards, Monty