Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2F8C12E0187 for ; Wed, 12 Mar 2008 17:55:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 93069-01 for ; Wed, 12 Mar 2008 17:55:31 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by postgresql.org (Postfix) with ESMTP id AC2EA2E2D7C for ; Wed, 12 Mar 2008 17:55:28 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id 22so2574732fge.23 for ; Wed, 12 Mar 2008 13:55:27 -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:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=zeZyk2drIWmaMB4cZAb0j7qxoTfc2YF/P6FY4RCmNCA=; b=dmLpY132rhMBqXbk3YPaYPTIxzqy/j2sUZX2yyFLdM07Haho/EybbGiTKsEc0hxorym8pmJopQ+M9R4Dau30x7D9KOQu0KW3l6iCv2lKCk5MyPHuLlqZmSg0bUtV1bA+BRM8HLd22cmmEQCCmso8uGZQAzkKo3ApT7Or3VEFoIg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=a10XfuSQQ0DaDknL7Ygy/Eu4jyasStitJFcmpaoHi69Go9mmPjl1qIUT+q6PC/H/84w2dyansWLbXpWqPLtsX2Pf6B97wDPa8gVVyQFxkEu/tnEUeXJATgumaFyX1INpjdoTiweGXxroSFCWa7lOzCGfYXdReqLJmJAKNME/d1g= Received: by 10.82.161.19 with SMTP id j19mr20896082bue.9.1205355326690; Wed, 12 Mar 2008 13:55:26 -0700 (PDT) Received: by 10.82.145.1 with HTTP; Wed, 12 Mar 2008 13:55:26 -0700 (PDT) Message-ID: Date: Wed, 12 Mar 2008 16:55:26 -0400 From: "Merlin Moncure" To: "Mark Steben" Subject: Re: Are piped columns indexable Cc: pgsql-performance@postgresql.org In-Reply-To: <013201c88480$fe93f990$14010a0a@dei26g028575> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <013201c88480$fe93f990$14010a0a@dei26g028575> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/263 X-Sequence-Number: 29217 On Wed, Mar 12, 2008 at 4:38 PM, Mark Steben wrote: > Given table t with columns a, b, c, d > > And index on t using btree (a,b) > > Is this indexable: > > Select * from t where a || b = '124cab' (or whatever) > > Assume a and b are defined as char(3) > I have tried various op classes and so far have just gotten sequential scans create index t_idx on t((a || b)); :-) merlin