-
From: <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Tuesday, January 31, 2006 8:01 PM
Subject: Re: Insert performance
--=_alternative 0062A2DC85257107_=
Content-Type: text/plain; charset="US-ASCII"
Imran Chaudhry <[EMAIL PROTECTED]> wrote on 01/31/2
Hi you could try:
1. disable autocommit while inserting those records, then commit after
finished.
2. You could try insert multiple column like this
insert into tableX values (a,b,c), (c,d,e), (e,f,g) ...
CMIIW
Vinay wrote:
I am using mysql5.0 on Hp-UX. IT took about 14 hours to in
Imran Chaudhry <[EMAIL PROTECTED]> wrote on 01/31/2006 12:44:17 PM:
> > I am using mysql5.0 on Hp-UX. IT took about 14 hours to insert 1.7
> millin records. How do I make >my insert run faster.The table has
> three foreign key references and the referencing columns are
> >indexed . Is that impac
> I am using mysql5.0 on Hp-UX. IT took about 14 hours to insert 1.7 millin
> records. How do I make >my insert run faster.The table has three foreign key
> references and the referencing columns are >indexed . Is that impacting the
> insert statement performance.
Just thought I'd add a little
Indexes slow down inserts, updates (if the indexed column is being updated),
and deletes.
If this is a data-refresh, consider dropping the indexes, importing the data,
and then indexing the table.
You haven't mentioned how you are getting the data into the database? Is this a bulk-load? Insert
"Vinay" <[EMAIL PROTECTED]> wrote on 01/31/2006 11:42:51 AM:
> I am using mysql5.0 on Hp-UX. IT took about 14 hours to insert 1.7
> millin records. How do I make my insert run faster.The table has
> three foreign key references and the referencing columns are indexed
> . Is that impacting the in
the indexes would significantly slow down the inserts, also are you doing
the insert from a sql script, if so you couldtry this
Wrapping your very long insert script in as follows
set autocommit = 0 ;
begin ;
[[thousands of inserts here]]
commit ;
If you use the *mysqldump* option --opt, you g
One thing you could try is limiting your index length
ALTER TABLE `sometable` ADD INDEX(`somecolumn`(10))
This will only index off of the first 10 characters of your data. Depending on the
type of data you store, this may improve your
performance.
- Original Message -
From: "Mikko Noro