[Nottingham] A quick bash updating table lookup

Mat Booth mbooth at fedoraproject.org
Mon Feb 7 19:27:20 UTC 2011


On 7 February 2011 18:52, Martin <martin at ml1.co.uk> wrote:
> On 7 February 2011 18:38, Mat Booth <mbooth at fedoraproject.org> wrote:
>
>> ... databases work but the indices are there
>> exactly to provide a record search that's faster than a linear
>> lookup...
>
> Indeed so for a static table. The sequence goes:
>
> Populate the table;
> Update the (hash or whatever) index;
> Enjoy quick reads from the table.
>
>
> For this case under consideration, the table is being continuously
> randomly updated whilst also being read to see if anything has been
> already seen...
>
> Do databases support such as (big) sparse tables or fast updating of a
> table index without a long pregnant pause upon each new entry and
> re-index?
>
> And I was trying to keep things 'simple'. At the moment, the biggest
> utilities being used are bash and md5sum!
>
>
> What would be 'nice' would be a "btree" utility...
>

Sure, I work on telemetry systems which by their nature do orders of
magnitude more inserts than selects. But if databases aren't your bag,
there are plenty of binary tree implementations in your favourite
non-bash scripting language. I'm with the other guys: data structures
in bash are just plain unwieldy. ;-)

Search for Python modules: http://pypi.python.org/pypi
Search for Perl modules: http://search.cpan.org/

I prefer Python over Perl. :-)


> Is there something that will give the largest inode number that has
> been used for a file in a filesystem?
>
>
> Still open to ideas! :-)
>
> Cheers,
> Martin
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
>



-- 
Mat Booth
http://fedoraproject.org/get-fedora



More information about the Nottingham mailing list