Getting attributes make query super slow


#1

Hello.

I noticed that if I query a list of entities in the and display just the entities, but not their values, it’s pretty fast. For instance:

match $t isa track; (is-of-genre: $t, genre-in: $g) isa track-genre-of; limit 10; offset 0; get $g;

I got results like the following, in a decent time:

$g id V49392 isa musical_genre;
$g id V21322 isa musical_genre;
$g id V71292 isa musical_genre;

However, when I want to display the attribute “name” of the genre, it is super super long, and I run into a timeout. The query looks like:

match $t isa track; (is-of-genre: $t, genre-in: $g) isa track-genre-of; $g has name $n; limit 10; offset 0; get $g, $n;

I have 100k tracks in my data, and quite the same amount of genre relations.

When I perform the same query on the web interface, it’s also very super long, but still displays. My CPU is burning.

I know the Grakn team is working on performance issues. Maybe this falls in this category. I wanted to highlight at some point, in my case, it is related to displaying attributes.


#2

Hey @mar,

yes we are indeed working on performances,
we will add this type of query to the performances tests.

Thanks for reporting!


#3

Hey,
Can you provide us with the following information:

How many name attributes are there (match $x isa name; aggregate count;)?
How many genres are there (match $x isa genre; aggregate count;)?

Thanks
Kasper


#4

I cannot start grakn right now, because of an error I never had in the past. :thinking:

But I can tell you that there are roughly 100k name attributes and around 30 genres.