skip to Main Content

I need to get the only data which is updated, I am getting complete data which is affecting the performance. So whenever a client hit the API I want to send the only changes (updated data) from DB which is related to client.

There is a scenario just like facebook. If user goes offline at 12 o’clock for 1 hour i.e he will be get online at 1 o’clock. Now I need to send the notifications to him that which activities are done within offline time period.
I am using timestamp right now but Is their any other better option ?
I don’t want to use timestamp or flag for last session ending time.

Thanks in advance

3

Answers


  1. Try to use Versioning concept there u can get latest record .. or try to get latest record from database of that client.

    Login or Signup to reply.
  2. There must be a column which might be an identification for updates, like last_modified_date or something. Apply the same in where clause and execute the query.

    Login or Signup to reply.
  3. I am not sure but i know in mongo db oplog can be use to monitored changes in database , i guess like that mysql log can be use to do such monitoring if you can access it with your code. may be i am still not sure you can give it a try

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search