It takes about 5 seconds for deleting one predicates,so I have to take lots of time while delete a type with several predicates,how can i delete a type with predicates faster?
5s? Can you share your query? is your predicate too big?
Sorry, but this alone doesn’t help.
Each type has 10 to 50 predicates, a total of more than ten types, each type has thousands to tens of thousands of data.
The picture shows that 10 predicates start with “ENTERPRISE.LICENSE” belong to a type named “ENTERPRISE.LICENSE” has 8410 data
Humm, let’s go by parts. You were saying that your query (delete mutations) was taking 5 seconds to complete. Right? How did you do this specific query and its data was too big? What did you actually do? Let’s talk about the other possibilities after I understand your case.
PS. Also, are you using DQL or GraphQL?
Screenshot is from Ratel which is using DQL, but this topic is categorized as GraphQL. So maybe by showing us an example of your query this might need recategorized as DQL. The delete syntax between the two of them is quite different as well.
I just want to delete several predicate and recreate them with java api,but while I delete the old and create the new with the same predicate name,it always out of time, so i operate it by Ratel UI and find that it takes a long time to delete predicates,so i guess the proplem is the deleteing operation.
so you are using: https://dgraph.io/docs/clients/java/#altering-the-database ?
I am wondering if maybe you are being blocked by:
An alter operation will also fail if one is already in progress with an error
schema is already being modified. Please retry. Though, mutations can be successfully executed while indexing is going on.
So indexing should not block you, but an ongoing schema update would.
But maybe this will add some more context to what you are trying to achieve:
Yes ,I’m using the java api to altering the database and I try it again by using Ratel UI,however I find it hard to delete or change the predicates because it takes about 10s even if I operate an empty predicate(with no uid).I consider maybe the database exist lots of deleted data in the disk,I think I should read the docs carefully again.Thanks for your help.