I have a table of web pages, with the primary key as hash of the URL, and an auto_increment ID column, which is also a unique key.
What I'm a bit confused by is why successive inserts don't increment the ID field by 1. When I first created the table and did a single insert, the first id was 1. The second insert produced and id of 5 and the third was 8.
I have a trigger on the table which, on insert, computes the hash of the URL of the webpage. Not sure if that's relevant or not.
It's not a problem to have gaps, but I would like to understand why successive inserts don't generate IDs with a step size of 1.
thanks!