From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout.scc.kit.edu (scc-mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id q04097fe027134 for ; Tue, 3 Jan 2012 19:09:07 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1RiEPj-00019j-1w; Wed, 04 Jan 2012 01:09:07 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RiEPj-0006FY-2i for tech@mdocml.bsd.lv; Wed, 04 Jan 2012 01:09:07 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RiEPj-0005pm-0O for tech@mdocml.bsd.lv; Wed, 04 Jan 2012 01:09:07 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1RiEPi-0007k9-Ka for tech@mdocml.bsd.lv; Wed, 04 Jan 2012 01:09:06 +0100 Date: Wed, 4 Jan 2012 01:09:06 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: half-atomically rebuild databases Message-ID: <20120104000906.GD2607@iris.usta.de> References: <20120101154538.GA5307@iris.usta.de> <20120101155508.GA4516@britannica.bec.de> <20120101162958.GB5307@iris.usta.de> <20120103124535.GA6689@britannica.bec.de> <4F02FDA4.6070003@bsd.lv> <20120103131927.GA7903@britannica.bec.de> <4F030660.9040704@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F030660.9040704@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Kristaps, > It's still debatable whether using recno(3) for the index is a good > idea. The general usage is to hit the btree(3) then look up in the > recno(3) Right, so typically, we do a full linear search through the whole large btree(3), doing a substring or even regex match for each entry, and after that typically a single or a few recno(3) lookups in the much smaller index. I'd *guess* almost the whole time is spent in the btree, so i'm not sure optimizing the recno will buy us anything. I'd discourage optimizing the recno part without first confirming that any relevant part of the time is spent there. In any case, please don't optimize the database format right now. ;-) > (btree(3) is harmless, I think, but useless: we don't do > lexicographic lookup as I'd originally thought). That statement makes sense to me. Yours, Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv