Skip to content

Speed up list query #124

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions