Re: good style?

Поиск
Список
Период
Сортировка
От Alan Gutierrez
Тема Re: good style?
Дата
Msg-id slrnb5cctd.cme.ajglist@localhost.localdomain
обсуждение исходный текст
Ответ на good style?  (Rafal Kedziorski <rafcio@polonium.de>)
Список pgsql-sql
In article <3E5629EE.6000406@polonium.de>, Rafal Kedziorski wrote:
> hi,
> 
> I have 8 tables and this query:
> 
> select u.users_id, m.name as mandant_name, u.login_name, u.password, 
> u.first_name, u.last_name, u.creation_date, g.name as groups_name, 
> ae.acl_entry_id, a.name as acl_name, p.name as permission_name
>   from mandant m, users_2_groups u2g, groups g, users u, permission p, 
> acl a, acl_entry ae, groups_2_acl_entry g2ae
>   where m.mandant_id = u.mandant_id and
>              u2g.groups_id = g.groups_id and
>              u2g.users_id = u.users_id and
>              g2ae.groups_id = g.groups_id and
>              g2ae.acl_entry_id = ae.acl_entry_id and
>              ae.acl_id = a.acl_id and
>              ae.permission_id = p.permission_id
> 
> I'm not using JOIN for get this information. would be JOIN a better sql 
> programming style? faster?

Better style, yes. Whitespace would help also.

Faster, maybe. If you use join clauses you will be able to take control
over your query, specifying what gets joined when.

-- 
Alan Gutierrez - ajglist@izzy.net
http://khtml-win32.sourceforge.net/ - KHTML on Windows


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

Предыдущее
От: Rajesh Kumar Mallah
Дата:
Сообщение: function defination help ..
Следующее
От: "Tambet Matiisen"
Дата:
Сообщение: Re: good style?