That works more quickly XQuery or X-Query

Interests high-speed parameters of sample of data on great volumes. Thanks.

Hi,

There is no general answer to the question which query interface shows the better performance. Therefore it would be helpful if you could be more specific.

Best Regards,

Thorsten Fiebig

Ok, I shall more certain. There is 1 million records in Doctype - Employee. What query will be faster:

  1. X-Query. Using REQUEST DOCUMENT(not using _cursor)
    [http]?_xql=Employee&…
  2. XQuery4
    for $a in input()/Employee
    return $a
    What query will be faster and why?

Hi,

If you just want to scan a large doctype, I assume there won’t be much difference between in XQuery and X-Query. Probably X-Query will be slightly faster. But if your doctype really contains millions of documents, your query will need so much time that this small difference will not matter.

Best Regards,

Thorsten

Thanks!
I am possible once again I shall specify…
1.
let $a := input()/Employee
return $a [position() >= 30000 and position() =< 40000 ]

[http]?_xql=Employee&_cursor=open&_position=30000&_quantity=10000

The same question: that will work more quickly?

Excuse for importunity… :oops:

Hi,

I think that the XQuery is faster because of certain optimizations that are done for position range filters.

Best Regards,

Thorsten