Fix perf issue with property rules for db graphs

Use multiple clauses instead as confirmed by perf test.
Using multiple clauses made rule preparation for d/q more complex
so introduced extract-rules
This commit is contained in:
Gabriel Horner
2023-07-25 17:20:17 -04:00
parent e9fecfa280
commit 3f52860cf1
5 changed files with 42 additions and 21 deletions

View File

@@ -155,7 +155,8 @@ prop-d:: nada"
{:file/path (str "pages/page" idx ".md")
:file/content (if (seq tags)
(str "tags:: " (str/join ", " (map page-ref/->page-ref tags)))
"")})))
"")
:file/blocks [[(str "block for page" idx) {:tags (set tags)}]]})))
_ (load-test-files pages)
{:keys [result time]}
(util/with-time (dsl-query "(and (property tags tag1) (property tags tag2))"))]