On Fri, 26 Nov 2004 12:42:18 +0100, Jean-Claude Wippler <[EMAIL PROTECTED]> 
wrote:
...
> What I mean is, why use:
>         view[a1:I,a2:I,a3:I,...]
> when you can do:
>         view[all[a:I]]
> and use double indexing?
> 
> It's bound to scale better than the first, especially for 20K property
> names.  If the types are not all integers, then you could use:
>         view[ints[a:I],strings[a:S],floats[a:F]]

i had a design where i was essentially duplicating a folder tree by
storing the folder's path in a string, and the files in it in a
subview:

stuff[folderpath:S,files[id:I,name:S]]
(and other data, of course.  note that it is not fully heirarchical,
just two levels.)

i found that when there were many rows (say 100,000) it was very slow
to open.  it seems to go through them all to get some metadata on the
subviews.

i changed to using two views:

folders[id:I,path:S]
files[id:I,folderid:I,name:S]

this was much, much faster, and as it turned out nearly all the code
for dealing with it (mostly, searching or traversing the tree) was
much simpler too.

(a sidenote:  it looks like metakit couldn't do a real folder tree,
since there  is no type which says "this is an arbitrary, dynamically
allocated, metakit type".  i'm not sure such flexibility would be a
good thing anyway, though the "store by columns" design would probably
make it fairly easy.  hmm, maybe not such a bad idea, that could
extend metakit from a relational database into the realm of
object-oriented DBs.)

-- 
mARK bLOORE <[EMAIL PROTECTED]>
_____________________________________________
Metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to