[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [SAGE] simple database problem



(Lots of detail deleted....)

> >         is there a better way to implement this databse 
> that will not 
> >be  prone to this kind of 'failure' (and make no mistake, 
> taking 30mins 
> >is for all intents and purposes, a failure)? of course, this 
> does not 
> >manifest itself on any of our other platforms, but Linux performance 
> >has always been unusually fragile with respect to the 
> contents of teh 
> >buffer cache.
> 
> It shouldn't need to be seeking all over the database simply 
> to read out all the contents. You aren't perchance sorting 
> the keys, and then accessing the elements, are you?
> 
>  From perl, the difference between:
>    foreach $i in keys %db
> and
>    foreach $i in sort keys %db
> (where %db has been associated with the dbm file) can be extreme.
> 
> Basically, you should access the database elements in 
> whatever order dbm wants to give them to you, then sort them 
> later if that's what you want.
> 
> (Note: my experience with this is very dated... it may have 
> changed since the mid-90s. :-)
> 

Greg,

Nope, that is still the way Perl functions in v5.x, not sure about
v6....anyone?....

Alan
--------------------------------------------------------------------
All opinions expressed are my own, not my employer's.
Alan S. Epps   alan.epps@nielsenmedia.com