Re: Conditional query plans.

Поиск
Список
Период
Сортировка
От Continuing Technical Education
Тема Re: Conditional query plans.
Дата
Msg-id 00aa01c03a8f$a2fe8f20$5911be86@cte.Dal.Ca
обсуждение исходный текст
Ответ на Conditional query plans.  ("Michael Richards" <michael@fastmail.ca>)
Список pgsql-sql
> update users set enabled='f',disablereason='We do not allow our
> system to be used for SPAM.' where id in (select id from users where
> loginid in (select distinct loginid from logins where
> ip='123.123.12.12'));

Would it run better as:

update users set enabled='f',disablereason='We do not allow our
system to be used for SPAM.' where id in (select distinct loginid from
logins where
ip='123.123.12.12');

Or perhaps even:

update users set enabled='f',disablereason='We do not allow our
system to be used for SPAM.' where id in (select unique id from users,logins
where
users.loginid=logins.loginid where ip='123.123.12.12');

I don't know if that helps the query plan, but it looks prettier :)




В списке pgsql-sql по дате отправления:

Предыдущее
От: "Edmar Wiggers"
Дата:
Сообщение: "too big" transactions
Следующее
От: jan.bajerski@viterra.pl
Дата:
Сообщение: