On Sunday, December 27, 2015 at 6:17:17 PM UTC, Hassan Schroeder wrote: > On Sun, Dec 27, 2015 at 1:29 AM, 'krfg' via Ruby on Rails: Talk > <rubyonrails-talk@googlegroups.com> wrote: > > > I did not delete any user, at very least not after creating the user that > > received id 2. > > Creating and deleting a first user would "use up" sequence # 1 in most > DBs, so the next user would be - surprise! - 2.
Note that on most dbs (eg postgres, mysql) if you roll back a transaction then that does not rollback the sequence, so you can get gaps in the ids of rows without ever having deleted any rows. Fred > > But as Colin said: it's only important that each user has a *unique* id, > not what it is. > > > Anyway, what most worries me is the repetition of 'User Load' when I query > > the database. Would it be possible that the database holds two tables with > > same name 'users'? > > I can't imagine that being a possibility, but what's stopping you from > looking for yourself? > > And if you're concerned that an action is causing duplicate queries > to be run, why not look at the DB logs? > > -- > Hassan Schroeder ------------------------ hassan.schroe...@gmail.com > http://about.me/hassanschroeder > twitter: @hassan > Consulting Availability : Silicon Valley or remote -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c83f31f4-3501-44db-a8a0-71bb8f9a0c60%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.