How you are maintaining the relationship of cities with Subdivision?
Another one issue while generating data for Cities getting issue as stream has large amount of data around more than 1.3 million. Is there any parameter(range parameter) by which we can get the records.
Well you people have done a great job.
Thanks, Sharif Khan
Hey sharifskhans! The database is provided "as is" so any maintenance of relationships are being done by its collaborators. If you wish you can become one and help maintain everything up to date. You can limit the number of retrieved results using the limit method, which will retrieve the specific number of records, or, if you are paginating the results, you can also use the skip method together with the limit, so you can retrieve the exact page of records you need.
@Alexb4a.br Thanks for the response, you mean to say or if not it should Skipping and limit means, If want to get the data and we have 1.4 million records from 1.2 million to 1.35 million then we can pass Skip=1.19 million and limit = 2 million then we should get 1.21 million to 1.4 million records.
But its not working as it should work like.
And will surely help.
Thanks,
You probably shouldn't retrieve as many results at once, as it will probably take a lot of time to process and deliver everything. What you can do is to retrieve paginated results, let's say, in a 100 records per page. Also, you can use the "select" method to retrieve only the columns you are going to use. This ensures you won't retrieve data that will not be used, and make everything faster. So, a query like that would be (in Javascript):
const query = new Parse.Query("Cities"); const count = await query.count(); const myLimit = 100; query.limit(myLimit); for (let page = 0; page < (count/myLimit); page++){ query.skip(page * myLimit); query.select('name', 'code'); let results = await query.find(); }
Something like that. I did not test this code, but something very similar should work.