The non-admin user should be checking extra query terms, to enforce the read permissions it has through its roles. That might be enough to explain the difference. I think the extra terms will show up in an xdmp:query-trace, if you want to verify that.
You might also try the 'diacritic-sensitive' and 'case-sensitive' options. That should speed up the value-matching a bit. -- Mike On 25 Mar 2013, at 13:40 , Will Thompson <[email protected]> wrote: > I ran this in a loop 100 times for the limited user and for admin, and the > limited user was roughly 50X slower than admin: > > xdmp:eval(concat( > 'xquery version "1.0-ml";', > 'cts:element-value-match(xs:QName("element"), "value*", "limit=1")'), > (), > <options xmlns="xdmp:eval"> > <user-id>{ xdmp:user("limited") }</user-id> > </options>) > > The limited user has a role with read permissions on the documents containing > those values (obviously, since it returns non-empty results), and also has > the app-user role. Otherwise, this user has no other roles. With log level = > debug, nothing really jumps out at me. I only see occasional "InMemoryStand", > "OnDiskStand", and "Saving" messages, and they appear regardless of the user > running the query. > > -Will > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
