FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » Database discussions » Holes in MYSQL Databases?
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
icon6.gif  Holes in MYSQL Databases? [message #162221] Fri, 09 April 2010 00:17 Go to next message
The Witcher is currently offline  The Witcher   United States
Messages: 662
Registered: May 2009
Location: USA
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
Had a long discussion with a young man today who explained quite emphatically that by deleting posts and or users (even move/split and merge operations) in a forum (any forum), left "holes" in the database which would eventually make the system unstable and crash.

Off hand I am quite dubious about his claim, primarily since he did not seem able to even match my own meager knowledge about MYSQL; though I have heard such claims before I have never placed much faith in them.

As I understand it MYSQL is not all that much different than any other database in that it has tables, fields, cells, columns and rows in which data is stored, retrieved and or manipulated.

And as I understand it, running Forum Consistency, Rebuild Search Index, and Compact Messages prevents the Database from being adversely affected by the above actins!

Could someone please clarify this for me?


"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Holes in MYSQL Databases? [message #162780 is a reply to message #162221] Thu, 15 July 2010 07:16 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
The tables are auto incremental, which means that when you create a new user, that user gets the id after the last one created:

1
2
3
4
5

If you delete the user with userid 3, your table will looks like this
1
2
4
5

and when you create a new user, that user will have id 6
That is the way it HAS to be and any other design will fail horribly, because if you create a new user in "slot 3" all former references to the old user will appear in the new user, etc.

So yes, there will be "holes" but they are not harmful in any way shape or form. The only problem would occur if the "userid" field in your database is just a smallint which can only hold up to 32767 different IDs.

However, since this is 2010, noone uses tinyints in a database anymore, we use regular INT which can hold 2,147,483,647 different IDs

If the need should arise, we just increase that to a bigint which holds 9,223,372,036,854,775,807, but I doubt that you will have 2 billion posts anytime soon!


Re: Holes in MYSQL Databases? [message #169345 is a reply to message #162780] Sat, 28 September 2013 04:38 Go to previous message
charleshbrenner is currently offline  charleshbrenner
Messages: 1
Registered: September 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Thanks for the details. I like the post. Smile
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: mssql 2012
Next Topic: slave database mysql
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Oct 24 09:27:07 EDT 2014

Total time taken to generate the page: 0.00663 seconds