John Aughey <[EMAIL PROTECTED]> writes:
> However, this next one is slow.

> calendar=# explain select * from schedule where schedule.owner_id in
> (select group_id from groups where user_id=101);

IN is not very well implemented at present.  You could try something
like this (in 7.1):

select schedule.* from schedule,
(select distinct group_id from groups where user_id=101) ss
where schedule.owner_id = ss.group_id;

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to