Mnesia Order By
Casper
casper2000a@REDACTED
Thu Apr 21 13:55:47 CEST 2005
Vladmir/Uffe,
Thanks for the info.
For that, do I have to read all the records before do a sorting? For
example, what if I have to navigate through a record set with about couple
of hundred thousands of records, 100 records in each page?
I.e. I jus want to navigate through a huge database on a Web Page, which
gives 100 records in each page. Data is sorted by the Key ID or Entered
Date. Viewer can navigate through the records by going to Previous and Next
Pages.
What I don't want is to do a sorting of 100,000 (let's say) records in each
page to get the 100 records to be displayed.
What's the best method I can use?
Thanks!
- Eranga
_____
From: owner-erlang-questions@REDACTED
[mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf Wiger (AL/EAB)
Sent: Thursday, April 21, 2005 5:15 PM
To: erlang-questions@REDACTED
Subject: RE: Mnesia Order By
The current solution is: sort the list produced by the select() call.
Using qlc, you can produce a handle that, when evaluated, returns a sorted
result.
See the reference manual on qlc (in stdlib.)
/Uffe
-----Original Message-----
From: owner-erlang-questions@REDACTED
[mailto:owner-erlang-questions@REDACTED]On Behalf Of Casper
Sent: den 21 april 2005 12:15
To: erlang-questions@REDACTED
Subject: Mnesia Order By
Hi All,
How do I do a mnesia:select or relevant data retrieval to read data in
ordered manner? (like ORDER BY in SQL)
Please advice as soon as possible.
Thanks!
- Eranga
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20050421/d6bb8a2f/attachment.htm>
More information about the erlang-questions
mailing list