Is it normal for a query to take up forever (3-5 minutes, no response) #1796
-
So I have a DB with this schema, and I wanted to query all
but this takes forever on an instance where there are about 16k nodes
Any idea that how I can optimize such a case? Edit-1: 30 minutes, still no response for the query |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
That's not how you check for the type of an object. Your query selects all If you want to use equality instead of
However, there's another issue here: links are unordered, so you can't rely on the order in
and then the query above becomes:
(Explicit |
Beta Was this translation helpful? Give feedback.
-
It's an interesting project you're working on! I've noticed this file -- https://github.com/isidentical/pyasdl/blob/master/generators/PythonAST.ql -- which looks like a GraphQL schema. If so, I just wanted to note that EdgeDB can automatically reflect its schema to GraphQL. |
Beta Was this translation helpful? Give feedback.
That's not how you check for the type of an object. Your query selects all
Constant
andCall
objects from the database unconstrained and then performs the comparison X*Y times for everyDict
object.If you want to use equality instead of
IS
to test for types, you must compare with theschema::ObjectType
instances instead, like this:However, there's another issue here: links are unordered, so …