Re: [SQL] Many databases

2007-09-21 Thread Stefan Arentz
things :-) S. On 9/22/07, Hiltibidal, Robert <[EMAIL PROTECTED]> wrote: > How is this possible? > > It smacks of a security issue which there are many proven solutions to > that. > > Would you elaborate? > > -Original Message- > From: [EMAIL PROTECTED]

[SQL] Many databases

2007-09-21 Thread Stefan Arentz
I'm in a strange situation where it makes more sense to give each user it's own database instead of having a single database with users and permissions. How does PG deal with that? Is it a problem to have have say a thousand small databases? S. ---(end of broadcast)--

[SQL] Speeding up schema changes

2007-09-03 Thread Stefan Arentz
Is there a way to speed up simple schema changes like ... ALTER TABLE foo ADD COLUMN bar CHAR(64); ... where foo already contains millions of records? On a live database changes like this can take hours. Even when the database is idle. Is there a better way to do this? S. --

Re: [SQL] Counting all rows

2007-06-23 Thread Stefan Arentz
On 6/23/07, Andreas Kretschmer <[EMAIL PROTECTED]> wrote: Stefan Arentz <[EMAIL PROTECTED]> schrieb: > I need to get statistics from a bunch of tables. Simply the number of > records in them. > > The query plan looks like this: > > => ex

[SQL] Counting all rows

2007-06-23 Thread Stefan Arentz
I need to get statistics from a bunch of tables. Simply the number of records in them. The query plan looks like this: => explain select count(id) from stuff; QUERY PLAN --- Aggregate (cost=1629.69..1629.

[SQL] Querying for name/value pairs in reverse

2006-07-15 Thread Stefan Arentz
I'm no SQL expert by any means so I'm wondering if something like this is possible. I have two tables like this: create table Errors ( Id serial not null, CreateDate timestamp not null, primary key (Id) ); create table ErrorValues ( Id serial not null, ErrorId int not null, Name varchar(2