Message from discussion
Neo4j performance using PHP API
Received: by 10.52.67.38 with SMTP id k6mr4083262vdt.2.1349122473596;
Mon, 01 Oct 2012 13:14:33 -0700 (PDT)
X-BeenThere: neo4j@googlegroups.com
Received: by 10.220.224.8 with SMTP id im8ls4800900vcb.4.gmail; Mon, 01 Oct
2012 13:14:31 -0700 (PDT)
Received: by 10.52.70.82 with SMTP id k18mr3018330vdu.1.1349122471872;
Mon, 01 Oct 2012 13:14:31 -0700 (PDT)
Date: Mon, 1 Oct 2012 13:14:30 -0700 (PDT)
From: terrasoff <terras...@gmail.com>
To: neo4j@googlegroups.com
Message-Id: <a92eb56a-3b35-4520-b25a-ab8d48559da3@googlegroups.com>
In-Reply-To: <1eb5a0d7-fe3c-4ca9-8389-8f534d3fae72@googlegroups.com>
References: <2bed2f75-8c6a-43ae-8148-400a2e9d5238@googlegroups.com>
<E9554F08-715F-4EC1-AFE2-4A3BF2E6D508@neopersistence.com>
<65c7fa09-115d-4719-b20b-44ea99c96472@googlegroups.com>
<1eb5a0d7-fe3c-4ca9-8389-8f534d3fae72@googlegroups.com>
Subject: Re: [Neo4j] Neo4j performance using PHP API
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_1893_33142907.1349122470956"
------=_Part_1893_33142907.1349122470956
Content-Type: multipart/alternative;
boundary="----=_Part_1894_29279088.1349122470956"
------=_Part_1894_29279088.1349122470956
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
On Monday, October 1, 2012 8:30:49 PM UTC+4, Josh Adell wrote:
> Have you determined how much time is spent on the server vs. in your
> client code? What is the execution time if you execute the query in
> webadmin or the neo4j shell?
>
> hmm... shell time is ~20ms (after warm up)
<http://i.imgur.com/o9jeE.png>
php code is too simple to make mistake (i've measured execution time of
this code)
public function getTags() {
$queryTemplate =
'START root=node(1)
MATCH root-[r*..3']->tag
RETURN collect(tag) as nodes, collect(r) as rels
';
$query = new NJ\Cypher\Query($this->getClient(), $queryTemplate);
return $query->getResultSet($query);
}
Seems, problems with PHP REST API
------=_Part_1894_29279088.1349122470956
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
On Monday, October 1, 2012 8:30:49 PM UTC+4, Josh Adell wrote:<br><blockquo=
te class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left:=
1px #ccc solid;padding-left: 1ex;">Have you determined how much time is sp=
ent on the server vs. in your client code? What is the execution time if yo=
u execute the query in webadmin or the neo4j shell?<div><br></div></blockqu=
ote><div>hmm... shell time is ~20ms (after warm up)</div><p class=3D"separa=
tor" style=3D"text-align: center; clear: both; "><a imageanchor=3D"1" href=
=3D"http://i.imgur.com/o9jeE.png" style=3D"margin-left: 1em; margin-right: =
1em; "><img style=3D"" src=3D"http://i.imgur.com/o9jeE.png" border=3D"0" wi=
dth=3D"320" height=3D"89"></a></p><div>php code is too simple to make mista=
ke (i've measured execution time of this code)</div><p class=3D"separator" =
style=3D"text-align: center; clear: both; "></p><div><div style=3D"backgrou=
nd-color: rgb(250, 250, 250); border: 1px solid rgb(187, 187, 187); word-wr=
ap: break-word; " class=3D"prettyprint"><code class=3D"prettyprint"><div cl=
ass=3D"subprettyprint"><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">public</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">fun=
ction</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> getT=
ags</span><span style=3D"color: #660;" class=3D"styled-by-prettify">()</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br> $=
queryTemplate </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
> </span><span style=3D"color: #08=
0;" class=3D"styled-by-prettify">'START root=3Dnode(1)<br> &nb=
sp; MATCH root-[r*..3'</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">]-></span><span style=3D"color: #=
000;" class=3D"styled-by-prettify">tag<br>  =
; RETURN collect</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify">tag</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">as</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> nodes</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> collect</span><span style=3D"color:=
#660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">r</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>as</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> rels<b=
r> </span><span style=3D"color: #0=
80;" class=3D"styled-by-prettify">';<br><br><br> =
$query =3D new NJ\Cypher\Query($this->getClient(), $queryTemplate);<br>=
return $query->getResultSet($query);<br>&nbs=
p; }</span></div></code></div><div><br></div></div><div>Seems, probl=
ems with PHP REST API</div>
------=_Part_1894_29279088.1349122470956--
------=_Part_1893_33142907.1349122470956--