Statement Limit and Clipped Wings
To:
Zoho Creator Support & Dev Community
Please tell me exactly how to calculate statement limits. I have run into the 5000 statement limit (one individual process i.e., on load, on submit, etc.) frequently and I want to know exactly how to calculate this so I can stay under the bar so to speak.
Right now this is how I have been counting...
variable = "variable"; = 1 statement
for each r in form sort form variable1 range 1 to 3
{
get_form = form[ID != 0];
get_form.variable1 = "variable1";
get_form.variable2 = "variable2";
variable3 = "variable3";
}
the above statement number would be..... (3 * 3) + 1 = 10 statements
Grand total for process = 11 statements
What is nebulous to me is the number of statements for....
fetch records....
If I fetch 1000 records is that 1000 statements or is it only when I update or delete those 1000 fetched records does it become 1000 statements?
PLEASE BE VERY SPECIFIC as this sort of thing has really made it tough to make some great views and programs in ZC.
Could you make a little sheet of many examples please?
Thank you for your help!
Suggestion..
I know it's pretty much impossible for you to keep a count of the statements as it's calculated on the fly based on many, many variables in a ZC app.
However, could you create a built in function or write a function for the ZC community to use in testing the ZC statement limit for a process?
Personally I think the 5000 statement limit is very small and should be raised to at least 10,000!
Or perhaps make the statement limit AND THE INSERT ROW LIMIT an "a la carte add on" like you have for 5000 records, 500mb attachments, 500 emails per day, etc.
Don't believe me that 5,000 isn't big enough?
Well, yes 5,000 is plenty for a beginner user of ZC that is going to use Zoho strictly for adding records, viewing built in views, etc.
But, this 5000 statement limit really fetters developers in using Zoho Creator to build really powerful and cool apps!
Examples:
Using ZC to pull in tons and tons of company Twitter mentions for analysis.. (they have to get only a 100 records at a time or whatever)
Using ZC to download 200+ contact records from another REST API (basecamp, Freshbooks, Facebook, Zendesk, etc) then right that to a form..
Creating "from scratch html views" with custom css goodies, etc (I created one that loaded 80 record rows and hit the statement limit! Harsha, helped me a create a great pagination function that I can give other users that have this problem)
Tip!: If you have many, many collection variables in an html view and you are going to list them all on one html view do this!
Say you have more than one div or table in this html view that you want to load.. CREATE EACH DIV AND TABLE IN SEPARATE HTML VIEWS, than embed those individual HTML views back into your first html view.
Explanation: Loading an HTML view is a statement in itself just like a form>> on load. So by splitting up the divs/ tables into individual html views then embedding all of the views into one html view you are bypassing the statement limit.
I am sorry if this comes off as a rant! :)
I LOOOOOVE ZC. Deluge Script is so easy to write. The DB integration is so simple. I tell all my clients & friends about it!
I think it is important to bring this subject up because as Zoho Creator grows; more developers are going to see the simplicity, extensibility, feature set, and ZC API and go, "Wow, I coud build some REALLY SWEET apps on ZC instead of building them using PHP, Rails, .net, etc."
Then they are going to hit these performance limits and just move on.
Thank you Zoho for this great product! Again, I love Zoho Creator and Zoho Creator Support! I built one app which took me 2 months only to find out that the company I built it for thought it would take 6-8. THAT WASN'T ME THAT WAS ZOHO!
Thank you, Thank you!
Gaev, George, Pascal, anyone,.... Your thoughts?