At 1:15 PM +0200 9/4/07, Satyam wrote:
I was wondering if people is asking this in the belief that the autoincrement field is the record position in the database table and that by not reusing those positions, the space of the deleted records is wasted. Perhaps when they say renumbering what they are meaning is compacting the database reusing the empty slots they assume those autoincrement fields point to. Someone remembers dBaseIII .dbf files? Well, perhaps that is the picture they have in mind.

Satyam


Satyam:

I'm sure that's the reasoning and the misconception that some people have, but there are all sorts of schemes to manage "slots" (gaps in memory or storage). I do not know how MySQL specifically handles storage fragmentation, but I am sure it does.

The best scheme I've seen (granted I'm limited) was how the older Macs worked with their memory manager. When programming and you asked for memory, you didn't receive a pointer to a block of available memory, but rather a handle which was a pointer to a pointer to a block of memory.

Then at times when the memory manager thought it was opportune (I haven't a clue as to how that was determined), it would go in and rearrange all memory to optimize the amount of free memory blocks. While the address the handles would point to would change, your pointer to the handle would remain the same as before. It was cool they way it did that and that's one of the reasons why the older Macs seldom crashed.

The newer Macs are based upon Unix and I haven't a clue as to how it handles memory, but it does a pretty good job from my experience.

I can't help but think that MySQL has had some of the best minds in the world working on it and this problem was resolved long ago.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to