Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

really bad performance issue. #5211

Closed
martingg88 opened this issue Oct 22, 2015 · 8 comments
Closed

really bad performance issue. #5211

martingg88 opened this issue Oct 22, 2015 · 8 comments
Assignees
Labels

Comments

@martingg88
Copy link

explain SELECT FROM media
LET $media = (SELECT config, $current.inE("upload").out as outVertex FROM #41:34638)
WHERE config = $media[0].config AND $current.inE("upload").out = $media[0].outVertex

we have 44177 records for media class.

the query above only have 14 records in total.

here this poor performance after doing explain.

{
"result": [
{
"@type": "d",
"@Version": 0,
"documentReads": 44177,
"current": "#41:44176",
"documentAnalyzedCompatibleClass": 44177,
"parentQuery": [

        ],
        "recordReads": 44177,
        "fetchingFromTargetElapsed": 11760,
        "evaluated": 44177,
        "media": [
            {
                "@type": "d",
                "@rid": "#-2:44176",
                "@version": 0,
                "config": "thumbnail",
                "outVertex": [
                    "#56:1250"
                ],
                "@fieldTypes": "outVertex=z"
            }
        ],
        "elapsed": 11760.945,
        "resultType": "collection",
        "resultSize": 14,
        "@fieldTypes": "documentReads=l,current=x,documentAnalyzedCompatibleClass=l,recordReads=l,fetchingFromTargetElapsed=l,evaluated=l,media=z,elapsed=f"
    }
],
"notification": "Query executed in 11.972 sec. Returned 1 record(s)"

}

@wolf4ood
Copy link
Member

@martingg88

Could you explain a little more your domain ?

Is #41:34638 a media record?

@martingg88
Copy link
Author

yes...#41:34638 it is media record.

query here is try to list out all of the medias that meet to config and out vertex from #41:34638 itself.

@martingg88
Copy link
Author

any update?

@wolf4ood
Copy link
Member

@martingg88

can you explain your schema a little bit more so i can try to optimize your query?
From the explain i see that no indexes are used.

@martingg88
Copy link
Author

let's close this issue pls. Thanks

@luigidellaquila
Copy link
Member

Hi @martingg88

do you mean that you found a solution for this?

Thanks

Luigi

@martingg88
Copy link
Author

yes. try to use the many indexes for the query.

@luigidellaquila
Copy link
Member

Ok, closing, thank you!

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants