Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 5FD9A9FB252 for ; Fri, 3 Nov 2006 15:48:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 10463-06 for ; Fri, 3 Nov 2006 19:48:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by postgresql.org (Postfix) with ESMTP id A662C9FB1FE for ; Fri, 3 Nov 2006 15:48:29 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id x37so1641204nfc for ; Fri, 03 Nov 2006 11:48:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qyQs9xbORX/iaoUgKxaJXhMRP13WNJ7Hzzl76QVoC/0A5YJP9tDQ3rXWYX/7LxNT5frrnNQLFUK8+ZtBCmN7cHOXcH0dHo/fsun5I3dhVjHp95mtXFoWBgcK06+QWhou7Tc86dnMDd4nwdG5jOuES/6x/42yVLhujDtgUVyo4WI= Received: by 10.82.118.2 with SMTP id q2mr877504buc.1162583307989; Fri, 03 Nov 2006 11:48:27 -0800 (PST) Received: by 10.82.161.3 with HTTP; Fri, 3 Nov 2006 11:48:27 -0800 (PST) Message-ID: <1f30b80c0611031148q3e2af041r9b8ab1e5ac704b0e@mail.gmail.com> Date: Sat, 4 Nov 2006 00:48:27 +0500 From: imad To: "Dylan Lorimer" Subject: Re: Index + View Question Cc: pgsql-sql@postgresql.org In-Reply-To: <3ddac38d0611031117v742c5c84p3264c894709b559d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3ddac38d0611031117v742c5c84p3264c894709b559d@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/45 X-Sequence-Number: 26697 When you select from views, you are infact selecting from the underlying tables. Indexes created on those tables are used ultimately. --Imad www.EnterpriseDB.com On 11/4/06, Dylan Lorimer wrote: > Hi, > > If I've got several tables, each with their own indexes. I also have a view > that aggregates several of these tables. My question is, as novice-like as > it may sound, do I need to create new indexes on the view or do the indexes > from the orig. tables apply somehow when I select data from the view? > > Cheers, > Dylan >