Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Hello, I have a question, I need to make about 60,000 inserts into the database, you understand that to make such a request
new Model_Some:: factory (array ('column' => 'value', 'column2' => 'value') -> save ()
not a pretty sight, is there a version that would be possible to pass a multidimensional array to insert type
array ('column' => 'value32', 'column2' => 'dsdsa'),
array ('column' => 'dsads', 'column2' => 'valudasde'),
array ('column' => 'dsad', 'column2' => 'valdsadaue'),
array ('column' => 'valdsadsue', 'column2' => 'dasd')
and a box for a single request, or at least with the division as in the example of 60 000 records of 60 requests for 1000 entries at a time ie insert into table values ??() () () () etc
You could try the search function, was asked & answered before. But it's not possible with the Orm and not a planned feature either at this point. Aside from that: if you're inserting 60000 rows into a database you don't want to use the Orm, the added overhead is just too much for such an operation. When doing stuff on a massive scale always use plain SQL or at most the Query Builder.
use an ORM or not to use, it is not decided by you, the framework and are designed to ensure that would not write something that previously was done millions of times, but to save time. pure SQL, this is not an option when the field a lot, so I think that this must be
If you feel like that: write it up & pull-request. But doing massive DB operations with an ORM is pretty much insane, the added overhead of creating objects for each row is massive at that scale and unnecessary, which is why you should write SQL queries for this kind of thing.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion