There are a couple ways to do this. As some others have suggested, you could drop the
keys first, insert the data, and then restore the keys. I think this is the second
fastest method. Here are my picks, in speed order:
1. LOAD DATA INFILE -- this is very fast, and will not update the keys u
On Monday 22 October 2001 18:25 pm, Priya Ramkumar wrote:
> Hi Tom,
>
> Thanks for your response. It takes around 1 hour & 40 minutes to
> insert 28000+ records. Also, I find that the first few thousand
> transactions are quite fast but slows down later. I have MySQL on
> Linux. I have a concaten
You can define unique keys
CREATE TABLE MyTable (
X char(50),
Y char(25),
Z char(15),
Count_ int(11),
INDEX X (X),
INDEX Y (Y),
UNIQUE XY (X,Y));
and use a sql like INSERT IGNORE INTO MyTable VALUES(X,Y,Z) keep in mind
that the keys will grow fast.
The IGNORE stops error messages when the un
educe the amount of indexing in order to speed up
your inserts...
Tom Haapanen
[EMAIL PROTECTED]
-Original Message-
From: Priya Ramkumar [mailto:[EMAIL PROTECTED]]
Sent: 22 October 2001 06:26
To: Haapanen, Tom
Cc: [EMAIL PROTECTED]
Subject: Re: faster inserts & updates
Hi Tom,
T
Hi Tom,
Thanks for your response. It takes around 1 hour & 40 minutes to insert
28000+ records. Also, I find that the first few thousand transactions are
quite fast but slows down later. I have MySQL on Linux. I have a
concatenated primary key of multiple fields. And I also have a unique index
o
Priya,
Need more information ... how long does it take to insert 28,000 records?
On what kind of platform? How much data do the records contain? What kind
of primary keys and indices do you have?
Tom Haapanen
[EMAIL PROTECTED]
-Original Message-
From: Priya Ramkumar [mailto:[EMAIL P