Sean Hinde Sean.Hinde@REDACTED
Tue Oct 30 18:54:14 CET 2001

> Have you looked at mnemosyne:cursor function.
> From the documentation:
> Getting the answers in small or large chunks. The query may 
> be aborted when
> enough solutions have been obtained. These are called 
> cursors. The functions
> are cursor/1, cursor/2, next_answers/1, next_answers/3, all_answers/1,
> all_answers/3, and delete_cursor/1. 

OK, it looks like you can do it with bunch of mnemosyne queries - one for
each record type you are trying to get hold of. Bear in mind that each one
will extract all the values from mnesia using mnesia:match_object or similar
and then give you one of them.

If you have a lot of data this could well be orders of magnitude slower than
using the ets mechanisms to return one row from each query.

It would be exremely nice to see mnemosyne updated to take advantage of
ets:select and the partial results mechanisms. Maybe one day..


This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.

More information about the erlang-questions mailing list