Complex query

Dear All,

Help!!! I’m having problem on executing a complex query,

http://localhost/tamino/mydb/mycln?_XQL%281%2C16%29=%2Farticle%5B%28title+%7E%3D+%27*%E9%A6%99%E6%B8%AF*%27%29+or+%28abstract+%7E%3D+%27*%E9%A6%99%E6%B8%AF*%27%29+or+%28keyword+%7E%3D+%27%E9%A6%99%E6%B8%AF%27%29%5D%5Bsearch_date+between+%270000-00-00%27%2C+%279999-99-99%27%5D+sortby%28search_date+desc%29&_encoding=utf-8

The above query is definitely valid since I can get my result from a database which have only 10000 documents. But if this query is to be executed in our production environment, which contains 227377 documents, the following error occur,

Error start here
=============================================================================
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

XML document must have a top level element. Error processing resource ‘http://localhost/tamino/mydb/mycln?_XQL(1%2C16)=%2Farticle[(title+~%3D+‘*香港*’)+or+(abstract+~%3D+‘*香港*’)+or+(keyword+~%3D+‘香港’)][search_date+between+‘0000-00-00’%2C+‘9999-99-99’]+sortby(search_date+desc)&_encoding=utf-8’.

==============================================================================

I suspect it’s related to the number of documents returns because if I refine the query so that it will return lesser documents, it’s ok, for example if I remove the ‘*’. When I execute this query and monitor the database, it’s strange, the database will be stopped automatically!! I can see from the Tamino Manager that the green light is changed to red light.

Does anyone has any idea? Please…help…!!!

P.S. attached please find my schema for reference

Best regards,
Lun
article_ver2d.tsd (7.65 KB)

It sounds like the database is crashing on your query, so only a partial xml response is returned to your browser, and because the end tag is missing from the root element of the query response, your browser complains.

If a database crashes it produces files called Tamino.. and Tamino...xml in your Tamino location directory. The value of can be found by looking at registry key HLKM/Software/Software AG/Tamino/Keys and find the name of your database in the Data column. The correct value of is in the Name column (assuming your database runs on NT).

If you are entitled to Customer Support from Software AG you should raise a support request and send these files as evidence of the problem.

Can you please tell me what happens if you remove the desc option from your sortby, then rerun the query.

Thks

[This message was edited by Bill Leeney on 15 Nov 2002 at 12:27.]

Thanks Bill (again)!

After I remove “desc” in sortby, it works. But can you tell me why? I suppose “asc” is equals to “desc”, but I don’t know.

Do you have any idea in solving this?

Thank you very very much for the prompt reply!

Best regards,
Lun

I think if a query is causing the database to crash :frowning: then I would recommend that you raise the issue with your local Software AG customer support centre. Check here for more information.

Btw, desc sorts descending sequence and asc ascending sequence. But changing the query from asc to desc shouldn’t cause a crash!


Stuart Fyffe-Collins
Software AG (UK) Ltd.

Oh! Of course I know the difference between asc and desc. But I’m asking what is the difference in tamino’s behavior when specifying asc/desc. I wonder why Bill has the mind of removing the desc, it seems that he know it will work.

Thanks again for all the reply!
Lun

Its possible that your problem is a known one with sortby…desc. If you contact your local Software AG support center they will advise you accordingly.

Are you using Tamino V3.1.1.4?

Thanks Bill, happy to hear that it’s not my problem!

Tamino: Version 3.1.2.1, with Tamino XML Server 3.1.2 recommended fixes
OS: Development - w2k prof., Production - w2k server.

This morning, I try to remove the standard index (my search_date is xs:string) of my sortby field, it works!! But obviously, the query is very very poor in performance, and it return ALL matching documents (over 40000), rather than my specified _XQL(1,10), and eventually my browser crashed.

I will contact the support next Monday,
Thanks for all the replies…

Cheers,
Lun