From: | Michał Roszka <mike(at)if-then-else(dot)pl> |
---|---|
To: | pagongski(at)gmail(dot)com |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Table design - postgresql solution |
Date: | 2010-12-04 18:46:20 |
Message-ID: | 20101204194620.d7219a3f.mike@if-then-else.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Sat, 4 Dec 2010 13:24:27 +0000
Miguel Vaz <pagongski(at)gmail(dot)com>
> Your solution seems great and does the trick, but if most (and having
> some items that relate to all 3 tables) of my relations are between
> two tables, close to 1/3 of the id_tx fields would be null, correct?
> I may be wrong in thinking like this, but always had this thing of
> keeping tables very tight regarding null entries. Am i thinking
> wrong? Or maybe worrying too much on less important things. :-)
Well, test it. EXPLAIN is a cool thing.
http://www.postgresql.org/docs/9.0/static/sql-explain.html
http://explain.depesz.com/
http://explain.depesz.com/help/
You can do some optimisation and significantly improve performance
of particular SELECT queries by creating proper indexes. I would not be
too worried about the NULLs. I do not know, how much data and how large
database we are talking about. Maybe you should consult someone more
experienced. I only work with small databases: 2 GB of data, less than
a million rows per table.
Oh, and I am CC'ing the mailing list. ;)
Cheers!
--
Michał Roszka
mike(at)if-then-else(dot)pl
From | Date | Subject | |
---|---|---|---|
Next Message | James B. Byrne | 2010-12-04 23:37:41 | Re: PG84 and SELinux |
Previous Message | Cédric Villemain | 2010-12-04 14:12:10 | Re: Looking for auto starting procedures |