I've tried that as well and experienced the same delay. I tested more last night and realized local queries are running just as slow. Something else is going on and it seems to be isolated to my server boxes. I notice CPU spikes on my laptop but don't see any usage on the servers when queries are active. Thinking it may be a buffering problem, I wrote my own TCP client to test. No luck.

Do DNS or reverse DNS lookups occur at any time? I had a similar issue with MySQL and had to disable reverse lookup.

On Feb 22, 2013 5:00 AM, "Christian Grün" <christian.gruen@gmail.com> wrote:
Hi Scott,

different to tell what may be going on here. Maybe it's because the
data needs to be transfered to your client over the network? Have you
tried queries that don't return any results, or have you wrapped your
queries with the "count()" function to reduce the result size?

Best,
Christian
___________________________

On Thu, Feb 21, 2013 at 10:51 PM, Scott Graves <scott.e.graves@gmail.com> wrote:
> I'm testing inserts / updates / queries and ran into a puzzling issue.
> Testing for the existence of a node where the client and server are running
> on the same box executes in about 4-7ms; however, testing the same query on
> a remote server executes in a minimum of 1-1.5s.
>
> I've tested on both jre6 and jre7 as well as BaseX installations on 2
> different servers. Same issue either way. Although the logs appear to be
> from 127.0.0.1, I'm actually using an SSH tunnel for testing remotely but
> there's no real difference.
>
> 13:40:51.212 127.0.0.1:32264 admin OK Database 'LibraryDatabase' was opened
> in 0.84 ms. 1.21 ms
> 13:40:51.222 127.0.0.1:32264 admin OK QUERY[0] for $d in
> /db/table[@name='Music Library']/Setting/DataList/Data where $d/@Key='Id'
> and
> $d/@Value='0F5349957FB73A4585FBC7A392D4DEBA20F41667869FE6A8EDB14332E80C255C'
> return $d 0.12 ms
> 13:40:51.232 127.0.0.1:32264 admin OK ITER[0] 1.56 ms
> 13:40:51.247 127.0.0.1:32264 admin REQUEST EXIT
> 13:40:51.247 127.0.0.1:32264 admin OK 0.32 ms
> 13:40:52.327 127.0.0.1:32265 admin REQUEST CHECK LibraryDatabase
> 13:40:52.327 127.0.0.1:32265 admin OK Database 'LibraryDatabase' was opened
> in 0.8 ms. 1.17 ms
>
> Any help would be appreciated. I've spent only 1 day experimenting so far.
>
> - Scott
>
> _______________________________________________
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>