[arangodb-google] Re: Faceted Search Performance

2017-09-20 Thread Roman Kuzmik
done -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

[arangodb-google] Re: Faceted Search Performance

2017-09-20 Thread Jan
Thanks for the feedback! Sounds good. I also hope the changes can be integrated into a stable version soon. Best regards Jan Am Mittwoch, 20. September 2017 00:54:44 UTC+2 schrieb Roman Kuzmik: > > Thanks for a hint! > > We have wrote small service faced to calculate facets. > It split my huge

[arangodb-google] Re: Faceted Search Performance

2017-09-19 Thread Roman Kuzmik
Thanks for a hint! We have wrote small service faced to calculate facets. It split my huge AQL provided above into 5 queries: - main - to filter, sort and retrieve matching entities: - LET docs = (FOR a IN Asset FILTER a.name like 'test-asset-%'

[arangodb-google] Re: Faceted Search Performance

2017-09-18 Thread Jan
Hi, yes, it will scan the collection 4 times with the query below, once for each subquery. Short-term I do not see any way to speed that up with existing AQL. Long-term a few ways to handle this would be to parallelize the scanning or to collect and count the same input by multiple criteria

[arangodb-google] Re: Faceted Search Performance

2017-09-18 Thread Roman Kuzmik
4 seconds per facet, thus adding 3 more it takes us to 16 seconds. btw, why is that, arango is doing full scan anyways. is it doing it 4 times with the query bellow? Is there any way to make it smarter? LET docs = (FOR a IN Asset RETURN a) LET attribute1 = ( FOR a in docs COLLECT attr =

[arangodb-google] Re: Faceted Search Performance

2017-09-18 Thread Roman Kuzmik
compiled your changes from feature/mmfiles-hash-lookup-performance indeed, on single facet we are down to 4 seconds from 6 seconds (in the test case provided above). And no indexes needed. hope it will make to master soon. -- You received this message because you are subscribed to the Google

[arangodb-google] Re: Faceted Search Performance

2017-09-15 Thread Jan
Hi, I have profiled the execution of a single-facet query with the MMFiles engine this morning and I think we will be able to reduce the execution time quite a bit. In my local tests, I have seen improvements of around 40% in case there is a full collection scan (no indexes) and there is a

[arangodb-google] Re: Faceted Search Performance

2017-09-14 Thread Roman Kuzmik
Btw, Fyi, first query (AKA: LENGTH(g)) with an index on attribute1 runs almost same as second query (AKA: WITH COUNT). Here, 2nd query with an index takes 4.4 seconds. But it is still, just one facet. Usually you need a bunch, like in my "long" query in very first post. Let me re-write it using

[arangodb-google] Re: Faceted Search Performance

2017-09-14 Thread Jan
Hi, I tried it myself on my local laptop, and here are the results: Original query: FOR a IN Asset COLLECT attr = a.attribute1 INTO g RETURN { value: attr, count: length(g) } This executes in about 35 seconds with the 8M documents. The execution plan is not ideal, because it will sort the

[arangodb-google] Re: Faceted Search Performance

2017-09-14 Thread Roman Kuzmik
Thanks Jan for your reply! But, yes, we have tried "2.x old school" approach* WITH COUNT*, as well as brand new* DISTINCT*. Both yields similar sluggish results :-/ -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group

[arangodb-google] Re: Faceted Search Performance

2017-09-14 Thread Jan
Hi, one of the things to do for improving the query performance is to get rid of the "INTO" clause, as "INTO" will copy all documents found per group into a new variable "g": FOR a in Asset COLLECT attr = a.attribute1 INTO g RETURN { value: attr, count: length(g) } The query without