T
T
tgarl2021-12-13 17:49:46
1C-Bitrix
tgarl, 2021-12-13 17:49:46

How to bulk update directories?

There is an HL-block directory in which you need to fill in more than 200K records, checking whether they already exist or not.
How can such a problem be solved?

sequential use of $entity_data_class::getList, then add one by one is a very bad approach ((
If you use sql directly, then INSERT INTO allows you to add several records at once. Is there a possibility for api? or if I update not through api, but through sql what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Edward, 2021-12-13
@Drayde

We search for duplicates with one request, filter the source array based on the received duplicates, do add

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question