Arnau <arnaulist@andromeiberica.com> writes:
> The point I'm worried is performance. Do you think the performance
> would be better executing exactly the same queries only adding an extra
> column to all the tables e.g. customer_id, than open a connection to the
> only one customers DB and execute the query there?
[ shrug... ] That's going to depend on enough factors that I don't
think anyone could give you a generic answer. You'd have to test it for
yourself under your own application conditions.
However: doing it that way seems to me to create severe risks that the
customers might be able to look at each others' data. You probably want
to go with separate databases just as a security matter.
regards, tom lane