Received: from victoria.host4u.net (victoria.host4u.net [216.71.64.77]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7H7TbP50286; Fri, 17 Aug 2001 03:29:39 -0400 (EDT) (envelope-from mcurley@e4media.com) Received: from morganc.e4media.com ([162.83.167.42]) by victoria.host4u.net (8.8.5/8.8.5) with ESMTP id CAA28831; Fri, 17 Aug 2001 02:26:09 -0500 Message-Id: <4.3.2.7.2.20010817031239.028d90d0@e4media.com> X-Sender: mcurley@e4media.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Fri, 17 Aug 2001 03:29:36 -0400 To: , From: Morgan Curley Subject: Query Approach and performance Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200108/483 X-Sequence-Number: 13768 Hey everyone, On average, are multiple simple queries better performance-wise than joins? i.e. select A.col1 from table1 A select B.col2 from table2 B where B.col1 = A.col1 etc vs select A.col1, B.col2 from table1 A, table2 B where B.col1 = A.col1 Are joins better for small/large numbers of tables? Is there a diff? My approach to date has been to keep queries as simple as possible, and when I see a need for complicated joins, I create a view and then do simple queries against that. Does pg cache queries like Oracle does so that repeated queries don't need to go through the compile phase and run faster? Is this configurable? Thanks, Morgan