Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 583B5475B98 for ; Thu, 16 May 2002 18:22:07 -0400 (EDT) Received: from joeconway.com (unknown [63.210.180.150]) by postgresql.org (Postfix) with ESMTP id 48B12475AA7 for ; Thu, 16 May 2002 18:22:03 -0400 (EDT) Received: from [206.19.64.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 3.5.6) with ESMTP-TLS id 413052; Thu, 16 May 2002 14:16:06 -0700 Message-ID: <3CE4310C.8030302@joeconway.com> Date: Thu, 16 May 2002 15:22:04 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9) Gecko/20020311 X-Accept-Language: en-us, en MIME-Version: 1.0 To: josh@agliodbs.com Cc: pgsql-sql@postgresql.org Subject: Re: How can I tell the performance difference? References: <200205161429.50058.josh@agliodbs.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200205/181 X-Sequence-Number: 7816 Josh Berkus wrote: > Folks, > > I have a view which will be used very, very often in my database. As such, I > need to evaluate which of the two following structures is the best for that > view. However, I can't easily figure out which of the two explain plans > looks more costly. Can anybody help? > I would use PHP (or Perl or something) to generate some sample data (i.e. a few hundred thousand records or so) and then use EXPLAIN ANALYZE (after VACUUM ANALYZE of course ;-) ), instead of trying to guess performance based on EXPLAIN output that won't be relevant once you have data. Just my 2 cents . . . Joe