Skip to content

Speed up list query #124

@cybersiddhu

Description

@cybersiddhu

The list query seems to speed up quite a bit if the iteration is started from the cvterm instead of annotation collection. So, the existing one ...

FOR ann IN @@anno_collection
   FOR v IN 1..1 OUTBOUND ann GRAPH @anno_cvterm_graph
	FOR cv IN cv
		FILTER ann.is_obsolete == false
		FILTER v.deprecated == false
		FILTER v.label == @label
		FILTER v.graph_id == cv._id
		FILTER cv.metadata.namespace == @ontology
		LIMIT 10
		RETURN ann

should be replace by the following one

FOR cvt IN @@cvterm_collection
    FOR cv IN cv
        FOR ann IN 1..1 INBOUND cvt GRAPH "annotation_tag"
            FILTER cvt.graph_id == cv._id
            FILTER cvt.deprecated == false
            FILTER cvt.label == @label
            FILTER cv.metadata.namespace == @ontology
            FILTER ann.is_obsolete == false
            RETURN ann

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions