Hi,
Right now the website is to randomly pick a row with a "ID" number from the table, the number is chosen via php. The problem is there can be holes within the numbers due to deletion of entries over a period of time.
So far I had the table to drop the ID field and re-add it as auto_increment primary key to recount the numbers every time some entry is deleted. However the number of entries in row has surpassed 10000 and the slowness is notable.
recently few people even accessed pages while its recounting even, its not quite efficient. Is there anyway for mysql to easily recount and order the numbers accordingly?
By holes i mean:
What if say the random number is 5, but there is no 5. Thanks in advance.Code:1 NAME EMAIL ETC 2 NAME EMAIL ETC 4 NAME EMAIL ETC 8 NAME EMAIL ETC 90 NAME EMAIL ETC 91 NAME EMAIL ETC 92 NAME EMAIL ETC 93 NAME EMAIL ETC 94 NAME EMAIL ETC . . .![]()








Bookmarks