From: | Ertan Küçükoğlu <ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Advise on primary key for detail tables (OS: Raspberry Pi) |
Date: | 2017-04-05 15:04:39 |
Message-ID: | 014601d2ae1d$f2fb8460$d8f28d20$@1nar.com.tr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
I have a project which will be mainly built on Raspberry Pi and some parts
on Windows.
I must have a PostgreSQL 9.4.10 running on Raspberry Pi and another
PostgreSQL running on Windows. Though, there is still a possibility that
Windows database server will be something else that is not known to me, yet.
Since Raspberry Pi is running on a SD Card, data saved on Raspberry Pi will
be copied over to Windows database system for a proper backup & disaster
recovery.
I need to keep database server overhead as low as possible on Raspberry Pi
system. That is because software that will be a running is going to do some
time essential sensor communication.
I am about to start table designs on Raspberry Pi. There is one
master-detail-detail-detail structure I should implement. Master having
serial, uuid and some varchar fields. Uuid field being primary key. Details
have serial, uuid and some smallint fields.
I recall that it is "generally" advised to have a primary key on any table
used on a database server.
My question is: Is reading performance will be faster, if I remove primary
key on serial fields of detail tables and use a regular index put on master
table link fields only? In another words, is it advisable *not* to have a
primary key on PostgreSQL table?
If answer changes according to OS underlying, I appreciate replies indicates
so.
Thanks & regards,
Ertan Küçükoğlu
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Mair | 2017-04-05 15:20:20 | Re: expensive function in select list vs limit clause |
Previous Message | Adrian Klaver | 2017-04-05 14:39:13 | Re: browser interface to forums please? |