Ordered indices in Mnesia

Dave Smith dizzyd@REDACTED
Wed Dec 14 07:14:07 CET 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To clarify, I'm using disc-only, bag tables. The tables I'm dealing  
with are rather large...

D.

On Dec 13, 2005, at 10:59 PM, chandru wrote:

> Hi,
>
> On 14/12/05, Dave Smith <dizzyd@REDACTED> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> This may be a stupid question, but I just can't seem to find the
>> answer. Is it possible to create a ordered index in mnesia? For
>> instance, I want to do the SQL equivalent of:
>>
>> SELECT TOP 10 value FROM table
>
> Mnesia has ordered set tables. When you create your table, you have to
> specify the {type, ordered_set} option. This only applies to the
> primary index. You can then use select to retrieve the top 10 records
>
> cheers
> Chandru
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDn7gws6zMNAt8YgcRAm+tAJwMlSCaJb385FIw63Hgh7GoRSdRSgCfcn0y
NqGN3CHE9ql9rAKYywR5RPo=
=07Hi
-----END PGP SIGNATURE-----



More information about the erlang-questions mailing list