-
Notifications
You must be signed in to change notification settings - Fork 337
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
Extremely low perfomance of query with many relations #6409
Comments
This looks like a familiar issue that we've uncovered, @DmitriyMgar: when the query is long, the "type resolver" performs poorly in verifying the query is valid. We already have a solution to solve and it's documented here: #6194 . @flyingsilverfin is currently working on this issue, so you can expect this to be resolved soon. |
@haikalpribadi i think this is actually not type resolver - if you look at the above procedure it's not over the schema, it's over the data -- the type resolver procedure that is printed should have mapped the |
@DmitriyMgar do you have the schema you can share with us to reproduce this issue as we test fixes for the issue? |
@flyingsilverfin this is our schema - schema.txt By the way, we have noticed a great enhancment in response time after reducing the number of attributes in the get clause. |
Okay cool! Thanks for that. We're working on improving our static type checker that runs on every query, which is what causes your slowdowns (even 95 seconds sounds slow). Should be out in the next release! |
Thanks a lot! Looking forward to the next release :) |
Solved with #6431 !! |
Description
Query to TypeDB involving many relations takes extremly long time.
This is theschema with approximate number of instances:
Environment
Reproducible Steps
Steps to create the smallest reproducible scenario:
match (employee:$person,employer:$company,offered_position:$position) isa employment,has employment_number $employment_number,has employment_start_date $employment_start_date,has employment_end_date $employment_end_date,has employment_status $employment_status; (member:$person,union:$department) isa membership; (superior_company:$company,subordinate_department:$department) isa company_hierarchy; $person isa person ,has person_id $person_id,has person_gender $person_gender,has person_age $person_age,has person_birthyear $person_birthyear; $company isa company ,has company_id $company_id,has company_name $company_name; $position isa position ,has position_id $position_id,has position_name $position_name,has position_function $position_function,has position_upc $position_upc; $department isa department ,has department_id $department_id,has department_name $department_name; {$person_gender='male';};{$company_name='facebook';}; get $employment_number, $employment_start_date, $employment_end_date, $employment_status, $person_id, $person_gender, $person_age, $person_birthyear, $company_id, $company_name, $position_id, $position_name, $position_function, $position_upc, $department_id, $department_name;
Expected Output
We have been expecting to get response mutch more faster.
Actual Output
We got response in about 40 minutes
Additional information
We've got something like this during the process of query
The text was updated successfully, but these errors were encountered: