Re: [SQL] Comments on subquery performance

2005-02-23 Thread Edmund Bacon
Typically, this is handled as (omitting '"'s and schema names for clarity) SELECT CatID1, CatID2, CatID3, t1.CatName as CatName1, t2.CatName as CatName2, t3.CatName as CatName3 FROM tblListings JOIN tblCategories t1 on CatId1 = CatID JOIN tblCategories t2 on CatId2 = CatID JOIN tblCatego

[SQL] Comments on subquery performance

2005-02-22 Thread T- Bone
Hello all, I created a query that contains two subqueries and joins and would like some feedback on whether: 1) this approach is logical; and, 2) if this is an optimal approach (performance wise) to return the records I seek. Essentially, I am attempting to perform a 'lookup' on a value in ano

Re: [SQL] Comments on subquery performance

2005-02-18 Thread Joel Fradkin
Yea we examined it here as a group as we are facing the same kind of stuff and found exactly the same thing. It does what MSSQL called a Cartesian join, and ran no faster other then removing the outer join logic. Using a regular join statement and only inner joins was the same speed and I think li

Re: [SQL] Comments on subquery performance

2005-02-18 Thread T- Bone
erformance differences were negligable. Any further thoughts or should I just stick with what I have and move on? Thanks in advance. Cheers, Jim From: Richard Huxton To: T- Bone <[EMAIL PROTECTED]> CC: pgsql-sql@postgresql.org Subject: Re: [SQL] Comments on subquery performance Date: Thu, 17 F

Re: [SQL] Comments on subquery performance

2005-02-17 Thread Richard Huxton
T- Bone wrote: (second attempt in two days to post this message...I appologise if for some reason a duplicate appears) Hello all, I created a query that contains two subqueries and joins and would like some feedback on whether: 1) this approach is logical; and, 2) if this is an optimal approac

[SQL] Comments on subquery performance

2005-02-17 Thread T- Bone
(second attempt in two days to post this message...I appologise if for some reason a duplicate appears) Hello all, I created a query that contains two subqueries and joins and would like some feedback on whether: 1) this approach is logical; and, 2) if this is an optimal approach (performance