Chris Portka wrote:
I'm trying to create a table in MySQL with a few simple requirements, but my table loads data very slowly. I need two columns, one of them a 10 digit string and another a very large integer. These pairs must be unique. There must be an index on the 10 digit string for fast lookups. Here's how I'm creating the table:

create table min (
    mobile char(10),
    bucketid bigint,
    foreign key (bucketid) references idbucket2(id),
    unique index uniqueminindex using btree (mobile, bucketid)
);

What could I be doing wrong? I require that the table have on the
order of a million entries. All inserts into the table are fairly slow,
and get slower the more things are inserted - with it eventually
becoming unbearably slow to add data. Thanks for any help,

What is "fairly slow" and "unbearably slow" in terms of rows per second (or seconds per row)?

What storage engine are you using?

Do you need a foreign key?  (this is related to the storage engine question)

Do the columns need to be NULL-able?

What is the output of SHOW CREATE TABLE, and is it what you expect?

In what order are you inserting the data?

Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to