Back

[SOLVED] Data consumption

  • 0
  • Databases
  • Functions
LDs_Group
8 Oct, 2023, 10:52

Absurd question about query performance.

Which case will save data between run query from SDK or with function?

TL;DR
Summary: The user is asking about data consumption and whether creating an edge function would decrease network consumption. They also have a question about saving data when making queries from the SDK or using a function. Solution: The user should create an edge function to decrease network consumption. As for saving data, it is unclear what they mean by "saving things locally" but using caching can help with query performance.
D5
8 Oct, 2023, 12:04

You mean caching?

LDs_Group
8 Oct, 2023, 15:05

Nop

D5
8 Oct, 2023, 15:15

Then saving things locally? I don't understand your question at all πŸ˜…

LDs_Group
8 Oct, 2023, 15:19
TypeScript
users
    - id
    - full_name

companies:
    - id
    - name
    - address

company_members
    - id
    - user_id
    - company_id

transactions
    - id
    - author_id
    - amount
    - date

I want to get user info then him company also and all transactions.

For that, I make 3 queries ( 1. get current user 2. use him id to get user data from db 3. again, use id to get the relative company 4. next, get all transactions )

LDs_Group
8 Oct, 2023, 15:22

Each query as a cost in network connection consumption (4x)

If I create edge function to do that, the network consumption decrease?

LDs_Group
8 Oct, 2023, 15:23

You mean ?

D5
8 Oct, 2023, 15:24

For now, nope

D5
8 Oct, 2023, 15:24

It will not have any advantages

LDs_Group
8 Oct, 2023, 15:29

In case to protect cascade "post request" as "atomic transaction" it not have any advantage too ?

D5
8 Oct, 2023, 21:38

For example, if you need to make several post requests or actions at once, It could be a benefit

D5
8 Oct, 2023, 21:38

But there will not be any difference in data consumption reflected in the Appwrite console usage

LDs_Group
9 Oct, 2023, 09:55

Nice

LDs_Group
9 Oct, 2023, 09:56

[SOLVED] Data consumption

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