FWIW, the query is indeed evaluated very quickly when using count() but of course it only returns an int.
-----Original Message----- From: Christian GrĂ¼n [mailto:christian.gruen@gmail.com] Sent: 05 December 2012 11:45 To: Mayer, Jonathan Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Query slow via PHP
An export of the Links.xml, by the way, shows that it's a 4.4meg file, so it's not small, but it's all localhost so it's not a network issue as far as I'm aware.
Good to know; so it seems that the PHP API isn't very good at retrieving data (and I was too careless claiming that the API to be used does not matter). Out of interest: I guess that your query will be evaluated much faster when wrapping it with "count(...)" ?
count( db:open('project', 'Links.xml') )
I'm no PHP expert, but I looked into the PHP client, and I saw/remember it uses some buffering:
https://github.com/BaseXdb/basex-api/blob/master/src/main/php/BaseXClient.ph...
Maybe someone else on the list has some idea how the API could be improved, or if there's any other reason for the delay?
Christian