Unfortunately I tried to change one of the tables in InnoDB, but the inserts
in that table continue to be slower than in the MyISAM table.
(From the MyISAM table no program is searching for data).
Octavian
----- Original Message -----
From: "Brent Baisley" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: <mysql@lists.mysql.com>
Sent: Tuesday, July 31, 2007 5:27 AM
Subject: Re: inserting data - speed
The most obvious is to make sure you are doing bulk inserts, which you
may already be doing.
MyISAM tables use table locking, so you usually can't insert while a
search is occurring. There are a few exceptions and v5 (5.1?) has another
option you can set so inserts are always added to the end of the file (so
selects can occur during inserts). If you are using v4, your options are
limited. Read up on concurrent inserts and it should make everything
fairly clear.
http://dev.mysql.com/doc/refman/5.0/en/concurrent-inserts.html
You'll run into other problems with Innodb when the tables get really
large, but they are usually the solution when locking is an issue.
An alternative solution is to have one server handling inserts/
updates/deletes and replicated to another server that handles the
selects. One interesting solution for extremely high insert rates is to
use the BLACK HOLE table type with replication.
On Jul 30, 2007, at 5:37 AM, Octavian Rasnita wrote:
Hi,
I made 2 similar programs that insert data continuously in 2 similar
MyISAM tables, each one in its own table.
Both tables have the same data (3.5 million records), but one of the
tables is update much slower.
The slower table is also accessed by other programs for getting data
from it.
Is there something I can do to make it faster?
(Using locking, special select queries...)
Or might it work faster if I will use an InnoDB table instead?
Thank you very much.
Octavian
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]