List:General Discussion« Previous MessageNext Message »
From:spameden Date:March 12 2013 9:50pm
Subject:Re: auto_increment field behavior
View as plain text  
Furthermore I've tested on 133K records and AUTO_INCREMENT field in
the end had the value of 234076.

mysql> select count(*) from billing.phone_codes;
+----------+
| count(*) |
+----------+
|   133332 |
+----------+
1 row in set (0.02 sec)

AUTO_INCREMENT=234076

So it basically means If I have large enough table I'd need to enlarge
PRIMARY KEY storage type, because it's almost double size of the
actual records.

I didn't delete records in this test too, I've inserted them all via LOAD DATA.

2013/3/13 spameden <spameden@stripped>:
> 2013/3/13 Reindl Harald <h.reindl@stripped>:
>>
>>
>> Am 12.03.2013 22:34, schrieb spameden:
>>> NOTE: AUTO_INCREMENT is 32768 instead of 17923 ! So next inserted row
>>> would have pc_id=32768.
>>>
>>> Please suggest if it's normal behavior or not
>>
>> what do you expect if a PRIMARY KEY record get's removed?
>> re-use the same primary key?
>> this is not the way a database is allowed to work
>
> No, I do not want the same key, I just want the next key after I
> insert 17922 records it should be 17923 ?
>
> I didn't delete or modificate any records.
>
>>
Thread
auto_increment field behaviorspameden12 Mar
  • Re: auto_increment field behaviorReindl Harald12 Mar
    • Re: auto_increment field behaviorspameden12 Mar
      • Re: auto_increment field behaviorspameden12 Mar
  • RE: auto_increment field behaviorRick James12 Mar
    • Re: auto_increment field behaviorspameden12 Mar
      • RE: auto_increment field behaviorRick James12 Mar
        • Re: auto_increment field behaviorspameden12 Mar
          • Re: auto_increment field behaviorspameden12 Mar
            • Re: auto_increment field behaviorspameden12 Mar
              • Re: auto_increment field behaviorspameden12 Mar