Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/17/84 chuqui version 1.7 9/23/84; site nsc.UUCP
Path: utzoo!watmath!clyde!bonnie!akgua!gatech!nsc!chuqui
From: chuqui@nsc.UUCP (Chuqui[The Time Traveller])
Newsgroups: net.unix-wizards
Subject: efficient directory structures w/ lots of files
Message-ID: <2100@nsc.UUCP>
Date: Tue, 18-Dec-84 16:31:18 EST
Article-I.D.: nsc.2100
Posted: Tue Dec 18 16:31:18 1984
Date-Received: Thu, 20-Dec-84 00:15:48 EST
Distribution: net
Organization: Callahans
Lines: 30

I'm putting together something that will involve storing lots of small
files in a database so that they can be accessed. I'm looking for
interesting ideas on how to build a directory structure that can be gone
through quickly and easily for this purpose. Normally, I use one of two
ways of dealing with it:

    o using part of the filename as a key into the directory structure. If
    the filename is foo, it could be stored as ./f/foo or even ./f/o/foo
    of some such

    o building some kind of external lookup table and building some kind of
    directory structure in an incremental fashion (create subdirs 1-n, and
    then store files as 1/foo, 2/bar,..., n/bletch, 1/blurfl).

Has anyone experimented with building hashed directories or some other form
of directory structure that doesn't make assumptions about the name of the
file or number of files in the structure? I want to minimize the quadratic
effect of Unix directory structures while maximizing the bushiness--
perhaps some tree balancing algorihm may be neccessary. 

comments, suggestions? (code? :->)

chuq
-- 
From behind the bar at Callahan's:		Chuq Von Rospach
{allegra,cbosgd,decwrl,hplabs,ihnp4,seismo}!nsc!chuqui  nsc!chuqui@decwrl.ARPA

The evil that men do lives after them; the good is oft interred with their
bones. So let it be with Caesar. The noble Brutus hath told you Caesar was
ambitious... And Brutus is an honorable man