At 11:45 -0500 3/12/03, Keith C. Ivey wrote:
On 12 Mar 2003, at 10:22, Douglas B. Jones wrote:
INSERT INTO virus VALUES (91207,'VBS/Kakworm');
INSERT INTO virus VALUES (117623,'VBS/Redlof-A');
As you can see, the numbers (n field) are way to high? Is this a bug
in mysql or n the sql?
It's far more likely to be a bug in your application or your
understanding. What makes you think the numbers are too high? You
said you did 122,111 REPLACE queries, so the last one should have had
an autoincrement value of at least 122,111. Maybe you want to use
INSERT IGNORE instead of REPLACE, so that you're keeping the first ID
you create instead of the last?
That will keep the original AUTO_INCREMENT value. Unfortunately, it
will still generate (and throw away) a new AUTO_INCREMENT value each
time. If one of the goals is to minimize number of values generated,
it's better to use just INSERT and ignore the error when the name
value is a duplicate.
--
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php