Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7587039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:34:30+00:00 2026-05-30T19:34:30+00:00

I have a notes app where a user creates notes and they get synced

  • 0

I have a notes app where a user creates notes and they get synced to a database with column noteId, which is an auto_incrementing field. The problem is that it gets a little complicated when the user creates a not when not connected to the internet, so I have to assign a temporary noteId, and do a bunch of other stuff related to the hierarchy of the note system structure.

So I’m thinking of dropping the auto_increment option all together and having the local device (iPhone/iPad – Objective C) create a unique ID (possibly a timestamp) that could be used in the database as the noteId. This way if the user is offline and reconnects at a later time, syncing would be as easy as sending the unique ID.

Two questions:

  1. How does this affect performance? Let’s say I have 500,000 notes in the database, and the user makes a change to one of his notes. With the auto_incrementing field I imagine it would be easier for the system to locate a noteId of 256,000, but with a general noteId system, would finding a noteId of 88689034 be a much lengthier process?
  2. What are good possibilities for generating a unique ID for a note locally on the user’s device? Time stamp?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:34:31+00:00Added an answer on May 30, 2026 at 7:34 pm

    One of the most common ways of generating unique IDs is to use UUID/GUIDs. MySQL has a UUID function, .NET has GUID functions, and it’s easy to write a function to create one in PHP or JavaScript… you don’t specify what language the client app is in. 😉 But yes, it can definitely affect performance. The best way to increase performance of UUIDs would be to convert the hex string into a binary number and store it across multiple INT columns.

    EDIT: Just thought of a better idea… why do you even need to generate an ID at the device? Couldn’t you just create the note, then when the device has connection, send the note to the server and let the server generate an ID at that point? Maybe on the device you would generate a temp ID for the device to keep track of it, but the real ID would still be generated by the server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database with two main tables notes and labels . They have
Consider I have a table with notes which could be associated with zero or
My iPhone app will have read-only system data AND read/write user data (stored either
I have a RoR app running rails 2.3.8 which makes use of the Rails
I have a winforms app that uses a UserControl. The user control's job is
I have a UITextView where the user can create notes and save into a
A user story: The user of our app creates road trips. A roadtrip is
i am building a webapp that will have notes fields all over the place,
I have multiple notes with class=.note and unique id each inside a div. On
I'm reviewing my old algorithms notes and have come across this proof. It was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.