Re: [PERFORM] Advice about how to delete

2007-07-06 Thread Heikki Linnakangas
Arnau wrote: CREATE TABLE user_groups ( user_id INT8 REFERENCES users(user_id), group_id INT8 REFERENCE groups(group_id), CONSTRAINT pk PRIMARY_KEY ( user_id, group_id) ) CREATE INDEX idx_user_id ON user_groups( user_id ); The primary key implicitly creates an index on (

Re: [PERFORM] Direct I/O

2007-07-06 Thread Jignesh K. Shah
On Solaris you just look at the mount options on the file system and see if there is a forcedirectio option enabled. Generally since PostgreSQL doesn't use any special options for enabling directio that's a known way to figure it out on Solaris. Atleast on Solaris the performance over buffered file

Re: [PERFORM] Advice about how to delete

2007-07-06 Thread Arnau
Hi Michael, Michael Glaesemann wrote: On Jul 6, 2007, at 9:42 , Arnau wrote: I have the following scenario, I have users and groups where a user can belong to n groups, and a group can have n users. A user must belogn at least to a group. So when I delete a group I must check that there i

Re: [PERFORM] Advice about how to delete

2007-07-06 Thread Michael Glaesemann
On Jul 6, 2007, at 9:42 , Arnau wrote: I have the following scenario, I have users and groups where a user can belong to n groups, and a group can have n users. A user must belogn at least to a group. So when I delete a group I must check that there isn't any orphan. To do this I have so

[PERFORM] Advice about how to delete

2007-07-06 Thread Arnau
Hi all, I have the following scenario, I have users and groups where a user can belong to n groups, and a group can have n users. A user must belogn at least to a group. So when I delete a group I must check that there isn't any orphan. To do this I have something like that: CREATE TABLE

Re: [PERFORM] Direct I/O

2007-07-06 Thread Alvaro Herrera
lai yoke hman wrote: > How can I know my PostgreSQL 8 is using direct I/O or buffered I/O? If > using buffered I/O, how can I enable direct I/O? What is the > performance difference of them? 1. it is buffered 2. you can't 3. there isn't any because there isn't direct I/O Unless you mess with the

Re: [PERFORM] improvement suggestions for performance design

2007-07-06 Thread Kalle Hallivuori
Hi Thomas & all, 2007/7/6, Thomas Finneid <[EMAIL PROTECTED]>: Heikki Linnakangas wrote: > ISTM that a properly normalized schema would look something like this: [example of tables per attr referencing main table containing only primary key] I agree that this is a way it could be done. In