From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | Juan Pereira <juankarlos(dot)openggd(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: PostgreSQL versus MySQL for GPS Data |
Date: | 2009-03-17 11:47:29 |
Message-ID: | 49BF8DD1.6020208@postnewspapers.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-advocacy pgsql-general |
Juan Pereira wrote:
> - The database also should create a table for every truck -around 100
> trucks-.
Why?
That's a rather clumsy design that makes it really hard to get aggregate
data across the fleet or do many interesting queries.
You're almost always better off using a single table with a composite
primary key like (truckid, datapointid) or whatever. If you'll be doing
lots of queries that focus on individual vehicles and expect performance
issues then you could partition the table by truckid, so you actually do
land up with one table per truck, but transparently accessible via table
inheritance so you can still query them all together.
Read up on PostgreSQL's table partitioning features.
> The question is: Which DBMS do you think is the best for this kind of
> application? PostgreSQL or MySQL?
As you can imagine, PostgreSQL.
My main reasons are that in a proper transactional environment (ie
you're not using scary MyISAM tables) Pg is *much* better about handling
concurrent load, particularly concurrent activity by readers and writers.
Pg's table partitioning support is also an ideal fit for your application.
--
Craig Ringe
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2009-03-17 13:18:37 | Re: PostgreSQL versus MySQL for GPS Data |
Previous Message | Pedro Doria Meunier | 2009-03-17 11:43:44 | Re: PostgreSQL versus MySQL for GPS Data |
From | Date | Subject | |
---|---|---|---|
Next Message | c k | 2009-03-17 11:56:44 | different results for large objects |
Previous Message | Pedro Doria Meunier | 2009-03-17 11:43:44 | Re: PostgreSQL versus MySQL for GPS Data |