Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id B45932E0091 for ; Thu, 17 Apr 2008 15:30:26 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 32187-03 for ; Thu, 17 Apr 2008 15:30:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.190]) by developer.postgresql.org (Postfix) with ESMTP id A33D02E0058 for ; Thu, 17 Apr 2008 15:30:16 -0300 (ADT) Received: by rn-out-0910.google.com with SMTP id i24so164491rng.0 for ; Thu, 17 Apr 2008 11:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=BZttWwiJsbKgECyU3OP1pEGAqGnrZdw9S9md5TI6S08=; b=uUPjAJRXbFpCaQvXELVdUeQfo04cKGCDbfAeZ+wnXPfwZe7SBDRuhWtSWHe6o0GLnADdLWPkwRpgCXJ8CqCN44HPGlStcNGiVHrJqYtCU+GB9xLuMaAp2fYIetu0EDIT+NR1rxIo8H4IxSug5vZsJeadU6NY64ThCsFt4nzb2HU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cfrqoAuokh5BxHh6clYnGWxkrIzKbX23e3OPEztBYE8ft7rZ//u08iukMTA4DYX+eglICjnl3CKa7hRq8ckhfHt2F43Bn+4jdVqIgkiMob3MpFWf0WxuW1CfsT70BH5wqsgpxH/gGQn7sam9e9um89Zw6wnDG9HN7sqaSI/Z84M= Received: by 10.142.87.7 with SMTP id k7mr511820wfb.167.1208457015294; Thu, 17 Apr 2008 11:30:15 -0700 (PDT) Received: by 10.142.185.20 with HTTP; Thu, 17 Apr 2008 11:30:15 -0700 (PDT) Message-ID: Date: Thu, 17 Apr 2008 11:30:15 -0700 From: "Jeffrey Baker" To: "kevin kempter" , pgsql-performance@postgresql.org Subject: Re: seq scan issue... In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/250 X-Sequence-Number: 29743 On Thu, Apr 17, 2008 at 11:24 AM, kevin kempter wrote: > Hi List; > > I have a large tble (playback_device) with 6million rows in it. The > aff_id_tmp1 table has 600,000 rows. > - why am I still getting a seq scan ? > You're selecting almost all the rows in the product of aff_id_tmp1 * playback_fragment. A sequential scan will be far faster than an index scan. You can prove this to yourself using 'set enable_seqscan to false' and running the query again. It should be much slower.