[basex-talk] group explicitly for performance improvements

2016-06-15 Thread Graydon Saunders
I'm wading about in several tens of megabytes of health care data, trying
to figure out what connects to which, as it were.  There are a few thousand
relationship elements that define some of the connections, and often more
than one such element per @type, so it's not enough to just group them by
_this_ relationship elements type, I need all the relationship elements
which have a particular type value.

let $relationships as element(relationship)+ := //relationship[@type]
let $relTypes as xs:string+ :=
distinct-values($relationships/@type/string())
let $relByType := map:merge(for $x in $relTypes return
map:entry($x,$relationships[@type eq $x]))
return $relByType

82895.5 ms

let $relationships as element(relationship)+ := //relationship[@type]
let $relByType := map:merge(for $x in $relationships
let $key := $x/@type
group by $key
return map:entry($key,$x))
return $relByType

170.79ms

Holy Wow.

Offered just in case anyone else is wondering why their query is so slow.

-- Graydon


Re: [basex-talk] question about http server

2016-06-15 Thread Mohamed kharrat
in the actual script, it's configured at 8984 port  for remote testing.But i 
have used 1984 port when i have tested locally, it's working of course.What i'm 
looking for is the test remotely 

  De : Christian Grün 
 À : Mohamed kharrat  
Cc : BaseX 
 Envoyé le : Mercredi 15 juin 2016 6h28
 Objet : Re: [basex-talk] question about http server
   
Are you sure that your code works locally? You seem to address the BaseX server 
with the HTTP address (8984), and you should probably use 1984.
Am 15.06.2016 2:51 vorm. schrieb "Mohamed kharrat" :

Anyone can please try to execute the file remotely?

  De : Mohamed kharrat 
 À : Christian Grün  
Cc : "basex-talk@mailman.uni-konstanz.de" 
 Envoyé le : Mardi 7 juin 2016 17h47
 Objet : Re: [basex-talk] question about http server
  
can you please now see in attachement the php file containing the connexion of 
baseX ?it do not work for me, it show me (cannot communicate with server)


  De : Christian Grün 
 À : Mohamed kharrat  
Cc : "basex-talk@mailman.uni-konstanz.de" 
 Envoyé le : Mardi 7 juin 2016 17h39
 Objet : Re: [basex-talk] question about http server
  
It both works for me.

A little hint: Better try to avoid posting private URLs to the list.


On Tue, Jun 7, 2016 at 6:27 PM, Mohamed kharrat  wrote:
> Can you please try this 2 adress and tell me what you get?
>
> http://197.0.28.226:8984
>
> and
> http://197.0.28.226:80
>
> Thanks
>
> 
> De : Christian Grün 
> À : Mohamed kharrat 
> Cc : "basex-talk@mailman.uni-konstanz.de"
> 
> Envoyé le : Mardi 7 juin 2016 11h07
> Objet : Re: [basex-talk] question about http server
>
> Hi Mohamed,
>
> This sounds like a general port issue, it’s probably not strictly
> related to BaseX. Did you check your firewall?
>
> Regards,
> Christian
>
>
> On Mon, Jun 6, 2016 at 5:23 PM, Mohamed kharrat  wrote:
>> Hi,
>> i have setted my pc as server over TinyWeb
>> i have everything ok.
>> i opened in  my pc  8984 port.
>> if i execute my php file containing xquery query locally, it works but
>> if i execute it remotely over the ip and port, it show me this message:
>> can't communicate with server.
>>
>> Anyone have an idea about that?
>>
>> Thanks
>>
>
>