• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Speed?
#2
Hi Stam,

We need to understand better the structure of your data.

Are you able to take a screenshot of the variable watcher showing a view of your data?

How many times is the repeat looping?

Your query looks like it is trying to get all the record IDs of a given key from a single table. The fastest way to get all the recordIDs of a given table is to use:  https://docs.livecloud.io/List/

All this said I think you have developed a type of sync. I think you are trying to determine which record IDs are missing in the cloud. You then cdb_batchCreate all the missing data to the cloud. That is pretty clever. I think we can save you some time.

The fastest way to sync is use:  https://docs.livecloud.io/Sync/
This function will do all the heavy lifting for you in a single line of code. It will give you the freedom to consider data collisions and handle deleting records that are not in the source. 

It would look something like:
get cdb_sync("*", "tableNameHere", "local", false, false)
--The asterisk is used to indicate that you want to consider all records in both the source and target of the sync operation.
--First false prevents unique data in the cloud from being deleted
--Second false says not to compare the versions of the records and replace data in the cloud with what is in the local data.

Please feel free to experiment with both of those booleans to get the desired result.

Let me know how this goes for you.
  Reply


Messages In This Thread
Speed? - by stamatis - 08-31-2020, 06:04 PM
RE: Speed? - by mark_talluto - 09-01-2020, 12:59 AM
RE: Speed? - by stamatis - 09-20-2020, 02:25 AM
RE: Speed? - by mark_talluto - 09-21-2020, 03:40 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)