while iterating through some lines of text and checking it existence in a model, I realized that the iteration just got slower with every line parsed. After some research I found out that adding the condition in the iteration lead to multiple conditions in the query which was created by ATK. The query string got bigger and bigger until it nearly got to a standstill.
So I had to find a way around - removing the condition to start with a "fresh" model. I always though unloading the model would do that - but this does not make sense after all. The function
reset() also did not do the trick because it is just calling
unload(). So I went into dsql and removed the where part with
$model->_dsql()->del('where');. Is there a better, more elegant way to do this?
If you ask youself why I use multiple conditions in the loop, I need to find a record specified by multiple columns. I did not find a function that supports loading by multiple columns.