[erlang-questions] HOW TO IMPROVE THE PERFORMANCE OF DETS
Ulf Wiger
ulf@REDACTED
Fri Dec 22 10:20:35 CET 2006
Den 2006-12-22 06:24:17 skrev chamila piyasena <tchamila@REDACTED>:
> Hi,
> Thank you again Cristian.
>
> You said that indexing can be worked around although dets doesn't support
> it. I still searching a way to do it.
>
> Can you please tell me how it can be achieved? Are you telling like using
> B-Tree or some data stucture? But I don't got a way to combine this
> B-Tree
> concept in to Dets table.
If you wrap your dets calls with an access module, you
can for example add a second dets file which uses another
attribute as the key. You can make this a bag table.
One thing you need to do when updating an object, is to retrieve
the old index keys using the old object key, delete them and
storing new keys (you can of course calculate which keys need
to be deleted/added).
That way, you can make your own index.
BR,
Ulf W
--
Ulf Wiger
More information about the erlang-questions
mailing list