Back

There is a problem with the performance of database queries.

  • 0
  • Databases
  • Self Hosted
erikkamalov
18 Dec, 2023, 14:14

Is it possible to limit the depth of the request when receiving a document?

I noticed a large performance drawdown when a table of not many relationships is obtained. Is it possible, like sql, to simply get an id from related objects.

How to speed up query performance?

TL;DR
There is a problem with the performance of database queries. One suggestion is to not use relationships and store the ID as a string instead. However, this may not be possible as relationships are supported up to three levels. Another suggestion is to retrieve specific fields from the related object instead of all of them. It is mentioned that queries on relationships are not currently supported. There is a mention of limiting the depth of the request when receiving a document. The user noticed a performance issue when obtaining a table with few relationships and asks if it is possible to only get the ID from related objects like in SQL. The user also asks for tips on how to
Ernest
18 Dec, 2023, 14:30

Queries are not supported on relationships yet

erikkamalov
18 Dec, 2023, 14:38

@Ernest You misunderstood me, when a table has relationships with other tables, when one is requested, a related object is returned from another.

Ernest
18 Dec, 2023, 14:40

Aren't you looking to retrieve certain fields and not others from the related object?

ideclon
18 Dec, 2023, 16:01

I don't believe this is possible. And Relationships are only supported to three levels anyway.

ideclon
18 Dec, 2023, 16:02

You could just not use Relationships and just store the ID as a string instead

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more