We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Committing large number of save() is slow, even using DynamicUpdate

I am currently creating a webapp that processes large amounts of data at once (upwards of maybe 10000+ new records on a page load.) Though the amount of data is actually pretty small. I have set the relevant Models to useDynamicUpdate to speed up the process, but the page loads are still relatively long.

Eventually, this will all be done using AJAX requests so the page at least won't hang, but I am wondering if there is anything I can do to further speed up this process (a lot of the data will likely be a single large creeate process with later processes doing a save on unchanged data)



2.2k

ORM is generally heavy. If you want speed, why don't you think not using ORM, but using raw SQL.

If you insert a lot of records, "bulk insert" will give you better performance.

This is the route I am going. Thanks.

On Sun, Dec 28, 2014 at 9:09 PM, dschissler [email protected] wrote: