From: | Alan Gutierrez <ajglist(at)izzy(dot)net> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: good style? |
Date: | 2003-02-21 13:54:32 |
Message-ID: | slrnb5cctd.cme.ajglist@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
In article <3E5629EE(dot)6000406(at)polonium(dot)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(at)izzy(dot)net
http://khtml-win32.sourceforge.net/ - KHTML on Windows
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar Mallah | 2003-02-21 13:54:45 | function defination help .. |
Previous Message | Rajesh Kumar Mallah | 2003-02-21 13:51:56 | Re: good style? |