MySQL Forums
Forum List  »  InnoDB

Re: Very slow insert with Innodb
Posted by: Rick James
Date: January 17, 2009 11:58PM

Your 3 separate indexes work fine with the 4 selects you gave.

A minor note:
select * from Tbl1 where Fld1 = ? and Fld2 = ?
would work better with
KEY (Fld1, Fld2)
The former would also 'cover' a SELECT testing only Fld1 (but would not work for testing Fld2 -- the order is important). Ditto for KEY(Fld1, Fld2, Fld3)
Also, KEY (Fld2, Fld1) would work.

Do NOT turn off keys during INSERTs unless it is a HUGE insert (such as an initial load). When you turn keys back on, it has to rebuild all the indexes entirely -- usually a very costly process.

Options: ReplyQuote


Subject
Views
Written By
Posted
7033
December 30, 2008 09:12PM
2928
December 30, 2008 11:01PM
2915
January 05, 2009 08:28AM
2643
January 05, 2009 07:08PM
2677
January 05, 2009 11:46PM
2418
January 06, 2009 09:45PM
2871
January 07, 2009 03:37AM
2425
January 11, 2009 10:47PM
2302
January 17, 2009 09:44AM
Re: Very slow insert with Innodb
2388
January 17, 2009 11:58PM
2722
January 18, 2009 09:09AM
2343
January 18, 2009 05:01PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.