1 Replies - 553 Views - Last Post: 30 March 2018 - 12:43 AM Rate Topic: -----

#1 Foobarer   User is offline

  • D.I.C Regular

Reputation: 1
  • View blog
  • Posts: 269
  • Joined: 28-March 17

Best approach to remove non active id's and use them instead

Posted 29 March 2018 - 11:38 PM

I have a button that is like "on off" switch that stores information in a row table:
Sort of facebook "like" button - so every time you click, it updates a row in the table with the user id information.
But this button will probably be used quite a lot, and each click is a new unique id.
I can already see how the number of rows will increase rapidly, and probably cause trouble in future / performance issues?
Because in my case clicking it again to "unlike" doesn't delete it, it only sets the "active" column to '0'

Should I change it to completely delete a row instead of active column? Or should I somehow allow overriding column with '0' in the active column?


Or just set it to BIG INT and forget about it?

This post has been edited by Foobarer: 29 March 2018 - 11:39 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Best approach to remove non active id's and use them instead

#2 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6795
  • View blog
  • Posts: 28,083
  • Joined: 12-December 12

Re: Best approach to remove non active id's and use them instead

Posted 30 March 2018 - 12:43 AM

Presumably you need to retain information about which user clicked which button? In which case, unless there will be hundreds of thousands of rows, I wouldn't worry about it: databases can handle such amounts of data, and more.

At some point you could consider an archiving, or removal, process, for data that is three or five, etc., years inactive.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1