[Novalug] Choice of Linux database system for "smallish" project

shawn wilson ag4ve.us@gmail.com
Wed Nov 20 17:00:22 EST 2013


On Wed, Nov 20, 2013 at 4:25 PM, Greg Bledsoe <greg@bledsoehome.net> wrote:
> Replication is irrelevant to his use case (and fixed AFAIK anyway), as is,
> most likely, epoch time storage.
>

It's a *feature* - the epoch issue anyway, not sure if the replication
issues with slaves going offline and getting out of sync was a feature
as well, but this is documented (poorly):

If called with no argument, returns a Unix timestamp (seconds since
'1970-01-01 00:00:00' UTC) as an unsigned integer. If UNIX_TIMESTAMP()
is called with a date argument, it returns the value of the argument
as seconds since '1970-01-01 00:00:00' UTC. date may be a DATE string,
a DATETIME string, a TIMESTAMP, or a number in the format YYMMDD or
YYYYMMDD. The server interprets date as a value in the current time
zone and converts it to an internal value in UTC.

http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_unix-timestamp

I found out about this because I used perl to insert values in epoch
and then went to query something and used mysql to give me epoc values
that i could do > or < with and my counts were off.... Hours were
wasted because of this little *feature*.

> SQLite is simpler and lighter but it is also the definition of
> self-limiting.  If you are sure you will never need multiple access or grow
> it, ok.  Otherwise I wouldn't recommend it.
>

I recommend all people learn to drive in a Formula1 car because, you
never know, they might need the more advanced system.

> MySQL performs better out of the box than postgre with less tinkering and
> maintenance, and will use less load per request unless you want to invest
> time and effort into tuning for your use case.  Which based on description
> sure doesn't sound like the case here.
>

Reference?

> Bottom line:  MySQL (or mariadb) is a perfectly adequate and simple solution
> for the described case, and superior to Postgres in this case.  Sqlite is a
> consideration but has limitations that often make it insufficient.
>

Yes, MySQL should be considered when deciding what database to use.
But, if you don't know about the edge cases it presents, you'll spend
lots of time hating yourself for choosing it.



More information about the Novalug mailing list