Jeff, ----- Original Message ----- From: "Jeff Mathis" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Thursday, August 07, 2003 9:01 PM Subject: Re: reindexing
> what is the command to update InnoDB table indexes? if you mean update index cardinality statistics, then starting from 4.0.13: " ANALYZE TABLE now works also for InnoDB type tables. It makes 10 random dives to each of the index trees and updates index cardinality estimates accordingly. Note that since it is only an estimate, repeated runs of ANALYZE TABLE may produce different numbers. MySQL uses index cardinality estimates only in join optimization. If some join is not optimized in the right way, you may try using ANALYZE TABLE. " If you mean defragmentation, then dump + drop + reimport is the method. Note that you should add the indexes directly into the CREATE TABLE statement before the import. Creating indexes afterwards is slow, because MySQL recreates the whole table for each index you add. Greetings to Marko and Pekka in New Mexico! > jeff Best regards, Heikki Tuuri Innobase Oy http://www.innodb.com Transactions, foreign keys, and a hot backup tool for MySQL Order MySQL technical support from https://order.mysql.com/ > Brent Baisley wrote: > > > > You are referring to fragmentation. In this case I'm pretty sure it's > > just a matter of updating the indexes so that MySQL makes the correct > > assumptions about the distribution of data. MySQL assumes data values > > have an equal distribution in a database, updating the indexes will > > force MySQL to update it's assumptions and thus do a better job of > > optimizing searches. > > > > On Wednesday, August 6, 2003, at 12:17 PM, Jeff Mathis wrote: > > > > > I was under the impression that InnoDB tables took care of this for > > > you. > > > You only need to be concerned if you add/delete repeatedly from > > > anywhere > > > but the end rows of the table. > > > > > > I'd like to know if I'm wrong about this. > > > > > > > > > Adam Nelson wrote: > > >> > > >> I just did a major insert of new data and now all my selects have > > >> slowed > > >> down. The table is innodb. Is there a way to reindex everything > > >> without having to drop anything. Otherwise, I suppose I will have to > > >> drop the indexes and remake them. > > >> > > >> -- > > >> MySQL General Mailing List > > >> For list archives: http://lists.mysql.com/mysql > > >> To unsubscribe: > > >> http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > -- > > > Jeff Mathis, Ph.D. 505-955-1434 > > > The Prediction Company [EMAIL PROTECTED] > > > 525 Camino de los Marquez, Ste 6 http://www.predict.com > > > Santa Fe, NM 87505 > > > > > > -- > > > MySQL General Mailing List > > > For list archives: http://lists.mysql.com/mysql > > > To unsubscribe: > > > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > > > -- > > Brent Baisley > > Systems Architect > > Landover Associates, Inc. > > Search & Advisory Services for Advanced Technology Environments > > p: 212.759.6400/800.759.0577 > > -- > Jeff Mathis, Ph.D. 505-955-1434 > The Prediction Company [EMAIL PROTECTED] > 525 Camino de los Marquez, Ste 6 http://www.predict.com > Santa Fe, NM 87505 > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]