Sat, 4 Dec 2010 13:24:27 +0000
Miguel Vaz <pagong...@gmail.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
m...@if-then-else.pl

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to