X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D0DCDD1CA11 for ; Mon, 4 Aug 2003 16:56:13 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 30676-01 for ; Mon, 4 Aug 2003 13:54:57 -0300 (ADT) Received: from wight.ymogen.net (unknown [217.27.240.153]) by svr1.postgresql.org (Postfix) with SMTP id F36F8D1CA05 for ; Mon, 4 Aug 2003 13:56:01 -0300 (ADT) Received: (qmail 7578 invoked from network); 4 Aug 2003 16:56:01 -0000 Received: from unknown (HELO solent) (213.165.136.12) by wight.ymogen.net with SMTP; 4 Aug 2003 16:56:01 -0000 From: "Matt Clark" To: "Scott Cain" , "Richard Huxton" Cc: "PgSQL Performance ML" , Subject: Re: [SQL] EXTERNAL storage and substring on long strings Date: Mon, 4 Aug 2003 17:56:00 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <1060013646.1434.40.camel@localhost.localdomain> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/41 X-Sequence-Number: 2858 > > 2. If you want to search for a sequence you'll need to deal with the case > > where it starts in one chunk and ends in another. > > I forgot about searching--I suspect that application is why I faced > opposition for shredding in my schema development group. Maybe I should > push that off to the file system and use grep (or BLAST). Otherwise, I > could write a function that would search the chunks first, then after > failing to find the substring in those, I could start sewing the chunks > together to look for the query string. That could get ugly (and > slow--but if the user knows that and expects it to be slow, I'm ok with > that). If you know the max length of the sequences being searched for, and this is much less than the chunk size, then you could simply have the chunks overlap by that much, thus guaranteeing every substring will be found in its entirety in at least one chunk.