ino:last in Tamino 3

Hi all,

Is there in Tamino 3 anything like ino:last?

Regards,

Frederico
Consist Brazil

I am trying to figure out a similar problem in Tamino using XQL. I need to get the last record in a collection. I have tried using the last() function, but all it returns it the top documents in the collection.

I know this does not answer you question, I just wanted to point out that to me Tamino is useless unless I can get to the last record in a collection.

Knute Hestness :confused: :frowning:

I believe the new cursoring mechanism of Tamino v3 (i.e. _cursor=open etc) does not show ino:last but it provides information for next and prev operations. Can someone comment why ino:last and ino:first are not included in this result?

If you use the old style _xql(n,m) type query you get the v2 style response that does include ino:first, ino:next and ino:last.

The “position=1” works like the ino:first, but there isn’t something like ino:last…

Apparently not being able to retrieve the last node has been a problem in Tamino since the first version.

Knute Hestness

If you really want to get the last document in a collection, it’s not that difficult.

Just sort them in descending order, open cursor and ask the first document.

We don’t need only the last document, but the reference inside the query, with the others inofrmation.

Alexander,
So you saying to retrieve the entire 80,000 docs on the client and then sort? I could understand doing that if it was a small collection, but for a large collection it would take up a lot of band width to do that.

Knute Hestness
City of Tacoma

Frederico, know it. It’s for Michael who said the last document could help him a lot.

I also miss xql(n,m) style queries with ino:count(!) and ino:last attributes. But they did not always provide reliable results (worked for documents, but not always for nodes). And It seems this feature is difficult and cost to implement…

Michael, there is a cursor feature in Tamino that allows you to retrieve an arbitrary part of a query result. For example, the first document that confirms your query. If all documents in a collection are sorted vise versa, you can get the last one. Sorting is made by Tamino Server (sortby clause).

[This message was edited by Alexander on 26 Feb 2002 at 07:48.]

I can understand now why ino:last is not available. To enable ino:last there would have to be a complete set to work on, and this implies that a particular query has been completely resolved, and the set is sitting in core memory.

This set could be any size: say from 10 records to millions of records. For large sets typically the user would not view all the documents. So does it make sense to retain multiple sets in core? The approach that has been taken is no because Tamino is designed to house large volumes of documents (millions if not billions of documents), and also support many users which would require multiple large sets. Enabling ino:last would have a detrimetal effect on performance and weaken the product, because:
- memory requirements would be very high
- waiting for queries to complete to be stored in core could take a very long time.

Hope this clarifies things.