httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Avila" <>
Subject [users@httpd] MySQL versus Postgres Auto Increment
Date Wed, 19 Oct 2005 03:12:45 GMT
I have been reading the series of messages on MySQL versus Postgres. I have
a couple of concerns myself. There is one that is important to me. Am I
being paranoid or is there a good reason to be concerned? Here is my

I have programmed a database in MySQL 4.x. The database could have about
5,000 to 10,000,000 or more ids (depending upon the success of the project).
With MySQL, incrementing the id column is very simple using the reserved
word AUTO_INCREMENT. And retrieving the last id is very simple. With
Postgres, I have been shown examples on how to do this but it is additional
coding that I am not comfortable with. (As a matter of note, I have used
MySQL quite a bit but have yet to fully use Postgres. I have been "stalling"
using it more due to my unfamiliarity. That is my personal issue and I do
recognize that I do need to dig in and do it.) In addition, I understand
that in Postgres the numbers may not be sequential. I prefer that but it is
not a requirement. However, I also hear that there is a limit on high the id
number can go and that it can wrap around an get duplicate numbers.

So am I being paranoid? Is it really simple to accomplish the same thing in
Postgres as I have done in MySQL? Will I have problems down the road with
numbers trying to add themselves and then end up being duplicates? 

My preference is to use Postgres over MySQL for several reasons. However, I
am concerned that I may be getting in over my head with this auto increment
and retrieving the last id number. Keep the flames. This is not a us versus
them with MySQL versus Postgres. I really am trying to get comfortable with
Postgres and am really seeking help. Suggestions and help are most certainly
welcome. This is not a fault finding mission for either database. This is a
database that may be used throughout the United States by a volunteer group.
Getting it done correctly and being able to maintain it comfortably and
quickly is VERY important to me.

Thank you in advance to those that reply with suggestions on how to be more
comfortable with Postgres and how to make the auto increment in Postgres as
easy to create and retrieve as in MySQL.


View raw message